Skip to content

Theming

ui26 uses the same CSS variable token contract as shadcn/ui — --background, --primary, --foreground, and so on. The styling layer is tailwind-variants instead of CVA, but the token names are identical.

These are the semantic color tokens every ui26 theme defines. Toggle the theme picker (top-right) to see them switch live.

background
—background
foreground
—foreground
card
—card
muted
—muted
border
—border
accent
—accent
success
—success
warn
—warn
info
—info
purple
—purple
destructive
—destructive
ring
—ring

Your existing theme works as-is. Install any ui26 component and it picks up your CSS variables automatically — nothing to configure.

If you want to try a different palette, see available themes below.

If you don’t have a shadcn theme set up, install one before adding components. Without it, the CSS variables are undefined and components won’t look right.

One palette on :root. Light/dark handled by .dark on <html>. This is what most projects want.

Terminal window
npx shadcn@latest add https://winston-ui26.netlify.app/r/themes/shad.json

All themes as separate CSS files, each scoped to [data-theme="<name>"]. Use this if you want a runtime theme picker.

Terminal window
npx shadcn@latest add https://winston-ui26.netlify.app/r/themes.json

Add one line to your global stylesheet:

@import './styles/themes/all-themes.css';

Set data-theme on <html> to switch:

ValueResult
editorialeditorial light
editorial-darkeditorial dark
shaddefault light (also :root fallback)

shad · editorial · tix · neon-synthwave · cyberpunk-neon · pastel-kawaii · zen-garden · bubblegum-pop · retro-arcade · tropical-paradise · steampunk-cogs · space-odyssey · vintage-vinyl · misty-harbor

The docs site ships a working picker. It’s not extracted into a standalone package yet, but you can copy it from the repo:

Add your theme keys to the THEMES array in each file.

Create a CSS file with two blocks: one for light, one for dark. The dark block only needs tokens whose values actually change — everything else cascades from the light block.

[data-theme="sunset"] {
--font-sans: "Inter", system-ui, sans-serif;
--font-serif: ui-serif, Georgia, serif;
--font-mono: ui-monospace, Menlo, monospace;
--background: oklch(0.98 0.02 60);
--foreground: oklch(0.2 0.05 30);
/* ... full token contract */
--radius: 0.5rem;
--shadow-color: 30 20 10;
--shadow-xs: 0 1px 1px rgb(var(--shadow-color) / 0.05);
/* ... sm / md / lg / highlight-inset */
}
[data-theme="sunset-dark"] {
--background: oklch(0.14 0.04 30);
--foreground: oklch(0.96 0.02 60);
/* ... only what flips for dark */
}

For a single-theme setup, replace [data-theme="sunset"] with :root and .dark for the dark block.

Import in your global stylesheet:

@import './themes/sunset.css';

Every theme must define all of these. Shadows must be explicitly none — never omit them.

Surfaces --background --foreground --card --card-foreground --popover --popover-foreground

Interactive --primary --primary-foreground --secondary --secondary-foreground --muted --muted-foreground --accent --accent-foreground

Feedback --destructive --destructive-foreground --success --warn --info --purple

Structure --border --border-soft --input --ring --radius

Text / code --accent-ink --accent-soft --text-mute --code

Shadows --shadow-color --shadow-xs --shadow-sm --shadow-md --shadow-lg --highlight-inset

Fonts (only if your theme diverges from the default stack) --font-sans --font-serif --font-mono