Theme tokens
Everything in Zyra UI is a CSS custom property. Override any token in :root after the import — no forking a theme file, no !important.
How tokens are organised
Tokens are split into four tiers. Each tier references the one above it — change a token high up and everything below it updates automatically.
- Tier 0
Primitives
Raw color palette — every shade in the design system.
--zyra-color-violet-600Never override. Internal building blocks only.
- Tier 1
Dimension
Spacing, radius, fonts, motion. Identical across all themes.
--zyra-radius-mdOverride to change corner radius, font, or spacing globally.
- Tier 2
Semantic
Named by role, not color. These are the public theming API.
--zyra-color-primaryOverride to rebrand the whole app in one place.
- Tier 3
Component
Per-component slots that point to Tier 2. Scoped to one component.
--zyra-color-btn-primary-bgOverride to restyle one component without touching anything else.
How to override
Add this to your styles.scss after @use 'zyra-ng-ui'. Any token you set here wins the cascade for the whole app.
/* styles.scss — paste after @use 'zyra-ng-ui' */
:root {
--zyra-color-primary: #7c3aed;
--zyra-color-primary-hover: #6d28d9;
--zyra-color-primary-subtle: #ede9fe;
--zyra-radius-md: 6px;
--zyra-font-body: 'Inter', sans-serif;
}Color tokens
These update live as you switch themes. Override any of them in :root and every component that uses that role follows automatically.
--zyra-color-background--zyra-color-background-elevated--zyra-color-surface--zyra-color-surface-subtle--zyra-color-surface-inset--zyra-color-foreground--zyra-color-foreground-muted--zyra-color-foreground-subtle--zyra-color-primary--zyra-color-primary-hover--zyra-color-primary-subtle--zyra-color-border-color--zyra-color-border-strong-color--zyra-color-success-foreground--zyra-color-success-subtle--zyra-color-warning-foreground--zyra-color-warning-subtle--zyra-color-danger-foreground--zyra-color-danger-subtle--zyra-color-info-foreground--zyra-color-info-subtle--zyra-color-purple-foreground--zyra-color-purple-subtle--zyra-color-surface-code--zyra-color-on-brand--zyra-color-on-warning--zyra-ringShape & font tokens
These are the same across all themes — override them to change corner radius, typography, spacing, or motion globally.
Border radius
--zyra-radius-xs--zyra-radius-sm--zyra-radius-md--zyra-radius-lg--zyra-radius-xl--zyra-radius-2xl--zyra-radius-fullFont families
--zyra-font-body--zyra-font-display--zyra-font-monoSpacing scale
--zyra-space-1--zyra-space-2--zyra-space-3--zyra-space-4--zyra-space-5--zyra-space-6--zyra-space-8--zyra-space-10--zyra-space-12--zyra-space-16Motion
--zyra-transition-fast--zyra-transition-base--zyra-transition-slow--zyra-transition-springNeed to restyle one specific component?
Each component has its own tokens listed on its doc page — override just those and nothing else in your app changes. Browse components →