Theming

Using CSS variables and base colors to theme your components.
Components are styled with shadcn's semantic classes, like bg-primary and text-muted-foreground. Their colors come from CSS variables that ThemeProvider sets for light and dark mode, the same variables npx shadcn init writes to your CSS.

Base colors

The base color sets the neutrals: backgrounds, borders, muted text.
neutral
stone
zinc
mauve
olive
mist
taupe
tsx
<ThemeProvider baseColor="zinc">…</ThemeProvider>

Theme colors

A theme color is layered over the base color: primary, charts and the sidebar's primary.
amber
blue
cyan
emerald
fuchsia
green
indigo
lime
orange
pink
purple
red
rose
sky
teal
violet
yellow
tsx
<ThemeProvider baseColor="neutral" themeColor="blue">…</ThemeProvider>

Status colors

Beyond shadcn's palette, info, success, warning and error, each with a -foreground, as in daisyUI. They're styled exactly like shadcn's destructive: white text on the color, with the color at 60% in dark mode. error is --destructive, so the two are identical. The shades are Tailwind's, picked so white text has at least 4.5:1 contrast in both modes. Use them as classes (bg-success, text-warning) or through the components' color prop.
info
success
warning
error
tsx
<Button color="success">Save</Button> <Badge variant="soft" color="info">New</Badge> <Alert variant="dash" color="warning">…</Alert> <Card variant="dash">…</Card>

Soft and dash

Button, Badge and Alert take daisyUI's soft (a tint of the color) and dash (a dashed outline) variants, in any of the colors: primary, info, success, warning and error. The color also applies to default, outline, ghost and link. Without a color, soft and dash use the foreground. Card takes variant="dash" too: a dashed border without the shadow. Override the status colors with cssVars, like any other variable.

Radius

--radius sets the corner radius the components derive rounded-sm to rounded-4xl from.
tsx
<ThemeProvider radius="0.5rem">…</ThemeProvider>

Your own variables

Pass variables in shadcn's registry shape, { theme, light, dark }, without the leading --. Use any CSS color, including oklch():
tsx
<ThemeProvider cssVars={{ theme: { "color-brand": "var(--brand)" }, light: { primary: "oklch(0.55 0.2 265)", brand: "oklch(0.84 0.16 84)" }, dark: { primary: "oklch(0.7 0.15 265)", brand: "oklch(0.41 0.11 46)" }, }} > … </ThemeProvider> // className="bg-brand"

Try it

The Create page lets you pick a base color, theme, chart colors and radius, and gives you the provider code.
Built with @astrawind/ui and @astrawind/css. Components ported from shadcn/ui (MIT).