Semantic color tokens for backgrounds, text, borders, states, and emphasis. Built to support light and dark themes out of the box.

Prerequisites

Define semantic color variables in your CSS, then register them in @theme so Tailwind utilities like bg-primary and text-foreground are generated.

Avoid hardcoded hex values in components. Change token values in one place and all components update automatically.

Theme Modes

Choose one mode strategy based on product requirements. Most applications should start with both to support light and dark interfaces.

Mode Description
both
Define variables for both light and dark modes. Best default for applications with user theme switching.
light
Define only light mode variables. Use this when dark mode is intentionally not supported.
dark
Define only dark mode variables. Useful for dark-first products and internal tools.

Variable Tokens

These are the CSS variables your theme defines. Update the values to match your brand, but keep token names stable so utility usage in templates stays unchanged.

Theme Settings

Register your tokens in @theme so Tailwind generates utility classes for them. This connects your CSS variables to classes like bg-primary , text-foreground , and border-border .

app.css
@theme inline {
    --font-sans: "Geist Sans", ui-sans-serif, system-ui, sans-serif;
    --radius-ui: var(--ui-radius);
    --radius-card: var(--card-radius);

    /* ═══ Intent tokens ═══ */

    --color-background: var(--background);
    --color-foreground: var(--foreground);
    --color-title-foreground: var(--title-foreground);

    --color-card: var(--card);
    --color-card-foreground: var(--card-foreground);

    --color-popover: var(--popover);
    --color-popover-foreground: var(--popover-foreground);

    --color-primary: var(--primary);
    --color-primary-foreground: var(--primary-foreground);

    --color-secondary: var(--secondary);
    --color-secondary-foreground: var(--secondary-foreground);

    --color-accent: var(--accent);
    --color-accent-foreground: var(--accent-foreground);

    --color-muted: var(--muted);
    --color-muted-foreground: var(--muted-foreground);

    --color-destructive: var(--destructive);
    --color-destructive-foreground: var(--destructive-foreground);

    --color-success: var(--success);
    --color-warning: var(--warning);
    --color-info: var(--info);

    --color-border: var(--border);
    --color-input: var(--input);
    --color-ring: var(--ring);

    /* ═══ Flexiwind extensions ═══ */

    --color-surface: var(--surface-background);
    --color-border-strong: var(--border-strong);
    --color-border-card: var(--border-card);
    --color-border-input: var(--border-input);
}