- Layers
- Keep kit styles in
ds and product styles in features. - Tokens
- Use role tokens like and , not raw colours.
- Naming
- Use kebab-case files, PascalCase components and present-or-absent state attributes.
- Product code
- Compose public kit parts. Add a variant when a pattern recurs.
- Focus
- Use neutral rings for keyboard focus and borders for text fields.
- Hierarchy
- Use ink rank first, then the bold form of the same style.
Variant vocabulary
Compare common props and their defaults.
| Prop | Values | Default |
|---|
| variant | primarysecondaryghosttextdangerbareinverse | ghost |
|---|
| size | xssmmdlg | md (IconButton sm) |
|---|
| tone | neutralmutedaccentattentionsuccesswarningdangerplanaskdebug | neutral |
|---|
| render | Swap the element, keep the behaviour. | The part's own |
|---|