Join the Webstudio community

Updated last year

Convert multiple tokens

At a glance
When adjusting the "local" token style, I've often converted it to a token.

Would it be possible to add a feature where you could select multiple tokens and then convert them into a token?

For example, in the attached image, I'd want to select each of the 4 manually added tokens and convert them into a new single token with all their attributes.
Attachment
Screenshot_2024-02-07_at_10.07.19_AM.png
O
J
J
8 comments
like merge tokens?
I think this is something to address in tokens manager eventully
another solution is copy-paste, if you can copy all styles from a token, then paste it in the other token, you can merge 3 tokens in a few clicks
Yeah, that's what I meant. In the token manager, that would be cool.

The copy/paste approach you mentioned, do you mean that this is a possible solution down the road? I looked and am unaware of a way to copy paste at the moment so just trying to clarify what you meant.
doesn't exist, but can be done relatively easily @TrySound wdyt?
  1. Copy on token dropdown menu
  2. Paste on the same menu on a different token
  3. Paste with cmd+v into the input and token can be added in a different project where it didn't exist before
That sounds pretty cool actually. Thanks.
I think dynamic components will solve this use case too...

Or variables for that matter.

Lets say I want to create a card...

Dynamic components will let me attach 10 different tokens to it and make it easy to maintain 50 different card instances. Edit the card component and it syndicates everywhere. Meaning you can add or remove tokens and it'll sync to all components.

Or with variables you can call the token Card and attach your flex gap variable, color variable, etc but only have to maintain the one token making it easy to keep things in sync. And the styles aren't one off because they are actually variables making it consistent.

Guessing your use case here, but this is very common and right now you are either left with attaching a bunch of styles to Card (not consistent or maintainable) or choosing to add 5+ tokens (makes it hard to keep every Card instance in sync)
probably will reduce the pain, but copy/pasting tokens across projects and inside the tokens would still be probably very very useful
Add a reply
Sign up and join the conversation on Discord