Dynamic Tokens #1015
aaronreed708
started this conversation in
Ideas
Dynamic Tokens
#1015
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Theme Builder generates dynamic tokens that update user interfaces based on the following input:
The following input values are set by the developer in the code:
The following input is determined by the user's device
The end user could adjust the following input values in settings:
Moving forward, we may allow users to adjust the following input to meet their specific needs/likes:
Note: In design files, the designer can control all inputs to affect the interface rendered
Tokens are dynamcially based on the above user input. Below we'll document how this maps to the logic flow that influences tokens and how they relate to styling.
This list provides finer detail regarding dynamic token logic flow. Changes anywhere in the logic flow affect the value of the final token.
In the Theme Builder interface, when a user assigns a value or a value is pre-assigned, the UI indicates to the user if this value is linked to a standard token or a dynamic token.
The user can click on a dynamic token to see the logic flow and to see it's relationship to other components or styles, essentially indicating where else the token is used in the design system.
The user can click on a standard token to see it's relationship to other components or styles, essentially indicating where else the token is used in the design system.
In the Theme Builder CSS, the various values for each input type are grouped together in data-sets. For example:
Now, should your CSS use the CSS variable
var(--min-taget)
, it's value will be determined by the values input by the user. For example, if thedata-wcag
level is AA, the value of--min-target
will be 24px. If thedata-cognative
mode of dyslexia is then applied, the value changes to 44px. Finally, if thedata-platform
is set to android, the value becomes 48px.We may allow the user to add new dynamic components and identify the various inputs that affects its styling.
This could be important in dynamically rendering components differently in IOS vs Andriod. For example, the Switch UI component is slightly different in IOS vs Android.
Beta Was this translation helpful? Give feedback.
All reactions