Tokens
*Indicates potential component level tokens
Highlight: name is undecided still
Naming convention
[element] - [role] - [order]- [state]
Terms**:**
- Element: the part of the ui the token is being applied to, (ie border, button).
- Roles/Variants: the different specific visual or functional purpose of a single element.
- Roles/Variants can enforce hierarchy (ie primary, secondary) or refine the usage of the element (ie subtle, danger).
- Order: the sequential naming (ie 01, 02) of element variations when usage of the variations is more generally applied rather than applied to a specific component or object.
- Order does not imply hierarchy.
- Order should always be two number and start with a 0 when in the single digits.
- State: the interactive state (ie hover, active) being applied to its token parent.
Guidance:
- Element always comes first and is the only required "piece" of a token name.
- Variant, order, and state can be skipped if not needed
- Element and order can be used without variant (ie disabled-01) to distinguish between usage in tokens that are not hyper specific or may have multiple uses.
- In rare cases, there can be two variants names needed to clarify a token. Example:
border-subtle-alt where bother "subtle" and "alt" are both variant names.