-
-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Epic] Composition Tokens: M2 #1217
Comments
We are trying this out as an alternative to component tokens, a major hindrance is the inspect experience. It needs to be brought in line with other tokens in that there is at least a mouseover that lists referenced tokens and values. |
Composition request: it would be great to be able to reference compositions within compositions. Why: I’ve created a collection of what I call velocity tokens - which are groups of tokens that make up almost all of my components. It would be great to create another set of component compositions that utilize the velocity tokens, making it a lot quicker to build inside of studio. Another request for creating compositions: Recommendation: After applying all your tokens to a frame in figma, select the frame. We already know what tokens are applied in that frame with the inspect tab. It could be cool to have a button that said “create composition” and it would pull all those tokens into a new composition with the name being blank. Quick wireframes for what I was thinking with the last request. https://www.figma.com/file/UWX2pubNzWkG8i8Sf2IQCN/Automating-compostion-creation-in-studio?node-id=0%3A1&t=kMj3VPsgMbpKm2RH-1 |
Composing composition tokensHere’s what I’d like to see for composition tokens: If we could compose composition tokens, we could create base shapes or colour sets that could be reused across components. Similarly to how inheritance works with CSS, I would expect that if two composition tokens has conflicting values, the last one wins. But if you want to override a value, the order doesn’t matter because a property that you create directly on a composition token such as fontWeight for classDiagram
note for colorset_primary "Colour “molecule” consisting of \n colours for bg, text, border, (icon)"
Button *-- spacing_insetSquish_md : Composition
Tab *-- spacing_insetSquish_md : Composition
Button *-- typography_sm : Composition
Tab *-- typography_md : Composition
Button *-- colorset_primary : Composition
Tab *-- colorset_primary_inverse : Composition
class spacing_insetSquish_md {
verticalSpace_sm
horisontalSpace_md
}
class typography_md {
fontSize_md
lineHeight_md
fontWeight_400
}
class typography_sm {
fontSize_sm
lineHeight_sm
fontWeight_400
}
class Button {
fontWeight_500
action()
}
class Tab {
navigation()
}
class colorset_primary {
bgColor_blue700
textColor_neutral100
borderColor_blue900
}
class colorset_primary_inverse {
bgColor_blue100
textColor_blue900
borderColor_blue700
}
|
Would love to see the support of applying multiple composite tokens on one Figma layer. This would tremendously help us reduce repeating tokens. Before:
After:
So that way button size medium can combine with primary secondary styles to achieve the same goal. |
closing this epic as all sub-issues have been closed or migrated into Featurebase. |
Composition tokens was launched with the 102 release, we should plan for the next iteration of this feature.
Tasks for M2
If you've used composition tokens and have any feedback for us, leave your feedback in this issue 🙏
The text was updated successfully, but these errors were encountered: