Token Categories
Neo organizes design tokens into six main categories:Color Tokens
Contains all color definitions organized by purpose and context.
fgBrand
fgOnBrand
fgPrimary
fgSecondary
fgOnContrast
bgBrand
bgBrandHover
bgPrimary
bgSecondary
bgSecondaryHover
bgContrast
borderPrimary
borderSecondary
borderTertiary
success
/onSuccess
warning
/onWarning
danger
/dangerHover
/dangerPressed
/onDanger
buttonBg
/buttonBgHover
/buttonBgPressed
buttonFg
Spacing Tokens
Consistent spacing values for layouts and component padding.
extraSmall
small
medium
large
extraLarge
Border Radius Tokens
Corner radius values that maintain visual consistency.
none
small
medium
large
full
Shadow Tokens
Elevation and depth definitions for components and overlays.
small
medium
Typography Tokens
Complete type scale for clear information hierarchy.
header1
header2
header3
header4
body1
body2
label
button
code
Duration Tokens
Animation durations for consistent timing and smooth interactions.
pressed
hover
sidebar
toggleSwitch
dropdown
Using Design Tokens
Access design tokens through theneoCurrentThemeProvider
:
Benefits
- Consistency: Ensures visual harmony across your application
- Maintainability: Update designs by changing token values, not individual components
- Scalability: Easy to maintain consistent design at any application size
- Flexibility: Switch between light/dark themes or completely different brand themes
- Developer Experience: Clear, semantic names make code more readable