/ Docs
Theme tokens
Every color, radius, font, and transition in Zyra UI is a CSS custom property, organized in layered tiers — primitives, per-theme raw tokens, semantic tokens, dimension tokens, and per-component tokens. Override the semantic layer and everything downstream — including per-component tokens — follows automatically. Prefer to see them applied live? Open the theming page →
Tier 0 — Primitives
Raw palette values. Identical across all five themes and never read by components directly — every other tier derives from (or replaces) these.
--zyra-color-cyan-50--zyra-color-cyan-100--zyra-color-cyan-200--zyra-color-cyan-300--zyra-color-cyan-400--zyra-color-cyan-500--zyra-color-cyan-600--zyra-color-cyan-700--zyra-color-cyan-800--zyra-color-cyan-900--zyra-color-cyan-950Per-theme tokens (raw)
Defined once per theme file with identical names and different values — this is what actually changes when you switch between dark, light, ocean, amber, and rose. See it live on the theming page.
--zyra-color-bg-app--zyra-color-bg-panel--zyra-color-bg-surface--zyra-color-bg-raised--zyra-color-border--zyra-color-border-hover--zyra-color-border-strong--zyra-color-text--zyra-color-text-muted--zyra-color-text-dim--zyra-color-text-inverse--zyra-color-surface-inverse--zyra-color-glow--zyra-color-accent--zyra-color-accent-hover--zyra-color-accent-muted--zyra-color-accent-border--zyra-focus-ring--zyra-color-accent-secondary--zyra-color-accent-secondary-muted--zyra-color-accent-secondary-border--zyra-color-accent-tertiary--zyra-color-accent-tertiary-muted--zyra-color-accent-tertiary-border--zyra-color-success / -muted / -border--zyra-color-warning / -muted / -border--zyra-color-danger / -muted / -border / -text--zyra-color-info / -muted / -border--zyra-shadow-sm--zyra-shadow-md--zyra-shadow-accent--zyra-shadow-glow--zyra-color-btn-primary-text--zyra-color-btn-ghost-hover-bg--zyra-color-input-bg--zyra-color-input-border--zyra-input-shadow-focus--zyra-color-card-bg--zyra-color-card-border--zyra-color-card-section-bg--zyra-card-shadow--zyra-card-elevated-shadow--zyra-card-focus-ring--zyra-color-code-bg--zyra-color-overlay-bg--zyra-color-scrollbar-thumb-base / -track-base--zyra-color-tooltip-bg / -text / -border--zyra-tooltip-shadow--zyra-color-toast-bg / -border--zyra-color-spinner-inverse-track / -head--zyra-color-pill-active-bg--zyra-pill-active-shadow--zyra-color-preview-stage-bg--zyra-color-glass-bg--zyra-color-header-glass-bg--zyra-header-backdrop-base--zyra-header-shadow-baseTier 1 — Semantic
Role-based aliases over the per-theme raw tokens above. This is the layer components read from and the layer you should override — everything downstream follows automatically.
--zyra-color-background--zyra-color-background-elevated--zyra-color-surface--zyra-color-surface-subtle--zyra-color-surface-inset--zyra-color-surface-dropdown--zyra-color-overlay-scrim--zyra-color-foreground--zyra-color-foreground-muted--zyra-color-foreground-subtle--zyra-color-primary--zyra-color-primary-hover--zyra-color-primary-subtle--zyra-color-primary-border--zyra-color-border-color--zyra-color-border-strong-color--zyra-color-success-foreground / -subtle / -border-color--zyra-color-warning-foreground / -subtle / -border-color--zyra-color-danger-foreground / -subtle / -border-color--zyra-color-info-foreground / -subtle / -border-color--zyra-color-on-brand--zyra-color-on-success--zyra-color-on-warning--zyra-color-on-danger--zyra-color-on-info--zyra-ringTier 2 — Dimension
Typography, shape, motion, spacing, and z-index. Theme-invariant — identical values across all five themes.
--zyra-font-display--zyra-font-body--zyra-font-mono--zyra-radius-xs--zyra-radius-sm--zyra-radius-md--zyra-radius-lg--zyra-radius-xl--zyra-radius-2xl--zyra-radius-full--zyra-ease-standard--zyra-ease-spring--zyra-duration-fast--zyra-duration-moderate--zyra-duration-base--zyra-duration-slow--zyra-transition-fast--zyra-transition-moderate--zyra-transition-base--zyra-transition-slow--zyra-transition-spring--zyra-space-1 … --zyra-space-6--zyra-space-8--zyra-space-10--zyra-space-12--zyra-space-16--zyra-space-20--zyra-z-base--zyra-z-raised--zyra-z-dropdown--zyra-z-sticky--zyra-z-overlay--zyra-z-modal--zyra-z-tooltip--zyra-z-toastTier 3 — Component
Per-component namespaced aliases over the semantic and dimension tiers, grouped the same way the component library itself is organized. Implementation detail — override the semantic tier upstream instead.
--zyra-color-btn-primary-bg / -border / -hover-bg--zyra-color-btn-secondary-bg / -text / -border / -hover-bg / -hover-border--zyra-color-btn-ghost-text / -hover-bg / -hover-text--zyra-color-btn-danger-bg / -text / -border / -hover-bg / -hover-text / -hover-border--zyra-color-btn-outline-hover-bg / -hover-border--zyra-btn-disabled-opacity--zyra-btn-focus-ring--zyra-header-bg / -border / -border-width--zyra-header-padding-x / -gap--zyra-header-height / -height-sm / -height-lg--zyra-header-burger-size / -burger-radius--zyra-header-z-index--zyra-header-glass-bg / -backdrop / -shadow--zyra-header-divider-color / -divider-width--zyra-color-sidebar-bg / -border--zyra-color-sidebar-heading / -text / -text-hover / -text-active--zyra-color-sidebar-hover-bg / -active-bg--zyra-color-sidebar-badge-bg / -badge-text--zyra-color-drawer-bg / -text / -border--zyra-drawer-width / -max-width / -padding--zyra-drawer-nav-item-gap / -section-gap / -footer-gap--zyra-drawer-shadow--zyra-color-tabs-text / -text-hover / -text-active--zyra-color-tabs-border / -indicator--zyra-color-tabs-badge-bg / -badge-text / -badge-active-bg / -badge-active-text--zyra-color-tabs-pill-active-bg--zyra-tabs-pill-active-shadow--zyra-color-checkbox-bg / -border / -checked-bg / -checked-border / -mark--zyra-checkbox-focus-shadow--zyra-color-radio-bg / -border / -checked-border / -checked-bg / -dot--zyra-radio-focus-shadow--zyra-color-switch-track-off / -track-on--zyra-switch-ring--zyra-color-toggle-border / -bg-on / -fg-on--zyra-toggle-ring--zyra-field-label-font--zyra-color-field-label-color / -required-mark / -icon-color--zyra-color-field-bg / -border / -filled-bg / -focus-border--zyra-field-focus-shadow--zyra-color-field-hint-color / -counter-color / -counter-warn / -counter-error--zyra-color-field-success-color / -error-color--zyra-field-success-shadow / -error-shadow--zyra-color-select-text / -placeholder / -icon--zyra-color-select-bg / -border / -filled-bg / -focus-border--zyra-select-focus-shadow--zyra-color-select-panel-bg / -panel-border--zyra-select-panel-shadow--zyra-color-slider-track / -fill / -thumb / -thumb-ring / -text--zyra-color-file-upload-bg / -text / -border--zyra-color-card-border / -hover-border--zyra-card-radius--zyra-card-focus-ring--zyra-color-glow-border / -glow-shadow / -glow-shadow-strong / -glow-surface--zyra-color-avatar-primary-end / -blue-end / -purple-end / -warm-end / -contrast--zyra-color-code-keyword / -tag / -attr / -string / -number / -comment / -punct--zyra-color-carousel-bg / -text / -border--zyra-color-calendar-bg / -text / -border--zyra-color-progress-track-bg / -track-border / -label-color--zyra-color-progress-default / -success / -warning / -danger / -info--zyra-overlay-bg--zyra-overlay-z-index--zyra-overlay-fade-duration--zyra-color-scrollbar-thumb / -thumb-hover / -track--zyra-color-theme-switch-bg / -bg-hover / -text / -border--zyra-color-theme-switch-panel-bg / -panel-shadowWhat can I change?
Semantic and dimension tokens are the supported customization surface — override these and everything downstream follows. Primitives, per-theme raw tokens, and per-component tokens are implementation detail: they already derive from (or feed) the semantic layer, and their names can change between component updates.
✅ Safe to override
--zyra-color-background / -background-elevated--zyra-color-surface / -surface-subtle / -surface-inset--zyra-color-foreground / -foreground-muted / -foreground-subtle--zyra-color-primary / -primary-hover / -primary-subtle / -primary-border--zyra-color-border-color / -border-strong-color--zyra-color-success / warning / danger / info -foreground / -subtle / -border-color--zyra-ring--zyra-radius-xs … radius-2xl / radius-full--zyra-space-1 … space-20--zyra-font-body / display / mono--zyra-ease-standard / ease-spring--zyra-transition-fast / moderate / base / slow / spring🚫 Internal — don't override directly
--zyra-color-cyan-50 … cyan-950--zyra-color-bg-app / -accent / -text — swap themes instead of these directly--zyra-color-btn-primary-bg--zyra-color-checkbox-checked-bg--zyra-color-tabs-badge-bg--zyra-color-field-* / select-* / progress-* / header-* / sidebar-*Override example
Set any semantic token after the Zyra import — no forking a theme file required.
/* global styles.css — override any token */
:root {
--zyra-color-primary: #7c3aed;
--zyra-color-primary-subtle: #ede9fe;
--zyra-radius-md: 6px;
--zyra-font-body: 'Inter', sans-serif;
}