I think this is situational. With family or very close friends where there is an established culture of doing so I think it's OK to bring it, and to take it away. Although even then I think it's worth mentioning when you arrive so that everyone is clear.
Similarly, I think when you are all students it's normal to bring and take your own.
But otherwise I think it's better not to take it at all, or to leave it. don't think I'd go so far as to say it is tacky, but it just feels a bit uncomfortable.
In a similar situation in the future I would be inclined to either wait until they visit you, and serve them the new cocktail then.
Or if it needs unusual ingredients take those - so the alcoholic ginger beer and lime in this case, and then when cocktails are offered you can mention that you'd found a new recipie, and that you brought along the mixers if they'd be interested in trying it. But I think even that is only OK if these are close friends and you know them well enough to know they would be OK with it. Otherwise is feels a bit like bringing a side dish along to a dinner party which was not supposed to be a pot luck.