structyl

Resources

Design tokens

All design tokens are CSS custom properties injected by ThemeProvider. They automatically update when the theme or color mode changes.

Usage

Tokens are available as CSS custom properties and as Tailwind utility classes through the preset.

css / tailwind
/* CSS custom property */
background: hsl(var(--color-primary));

/* Tailwind class */
<div className="bg-primary text-primary-fg" />

Background & Foreground

Base surface and text colors for the page.

SwatchTokenTailwindDescription
--color-bg
bg-bg / text-bgPage background
--color-fg
bg-fg / text-fgPrimary text color

Card

Surface colors for card-like containers.

SwatchTokenTailwindDescription
--color-card
bg-cardCard background
--color-card-fg
text-card-fgCard text color

Popover

Colors for floating elements like dropdowns and tooltips.

SwatchTokenTailwindDescription
--color-popover
bg-popoverPopover background
--color-popover-fg
text-popover-fgPopover text

Primary

Main brand color used for buttons, links, and interactive focus rings.

SwatchTokenTailwindDescription
--color-primary
bg-primaryPrimary action color
--color-primary-fg
text-primary-fgText on primary
--color-primary-hover
bg-primary-hoverHovered primary
--color-primary-active
bg-primary-activePressed primary

Secondary

Subdued variant for secondary actions.

SwatchTokenTailwindDescription
--color-secondary
bg-secondarySecondary background
--color-secondary-fg
text-secondary-fgSecondary text

Muted

Low-contrast surfaces and placeholder text.

SwatchTokenTailwindDescription
--color-muted
bg-mutedMuted background
--color-muted-fg
text-muted-foregroundMuted / dimmed text

Accent

Hover and selection highlight.

SwatchTokenTailwindDescription
--color-accent
bg-accentHover highlight
--color-accent-fg
text-accent-foregroundText on accent

Semantic

Status colors for feedback states.

SwatchTokenTailwindDescription
--color-destructive
bg-destructiveError / danger
--color-destructive-fg
text-destructive-fgText on destructive
--color-success
bg-success / text-successSuccess state
--color-success-fg
text-success-fgText on success
--color-warning
bg-warning / text-warningWarning state
--color-warning-fg
text-warning-fgText on warning
--color-info
bg-info / text-infoInfo state
--color-info-fg
text-info-fgText on info

Border & Input

Stroke and input field colors.

SwatchTokenTailwindDescription
--color-border
border-borderDefault border
--color-border-strong
border-border-strongEmphasized border
--color-input
border-inputInput border
--color-ring
ring-ringFocus ring

Themes change token values

Switching between themes (slate, zinc, rose) or modes (light, dark) replaces all token values simultaneously. Your components automatically adapt — no class swapping needed.

slatezincrose