Skip to main content

Theming

Components use semantic color tokens, so they follow your theme in light and dark mode without extra setup.

Color tokens

Components only use semantic utilities such as bg-background, text-muted-foreground, border-border and bg-primary. Those map to the CSS variables your project already defines in globals.css, so changing a variable changes every component.

TokenUsed for
--background / --foregroundPage surface and main text
--muted / --muted-foregroundSubtle fills and secondary text
--primary / --primary-foregroundMain actions and active indicators
--border / --input / --ringHairlines, fields and focus rings
--destructiveErrors and destructive actions

Dark mode

Dark mode follows the dark class on <html>. Define the dark values of each token under .dark and the components switch with it.

Accent presets

KineticProvider writes the active preset to a data-accent attribute. Each preset overrides --primary, --accent and --ring, and nothing else, so the rest of the interface stays neutral.

globals.css
[data-accent="indigo"] {
  --primary: oklch(0.511 0.23 277);
  --primary-foreground: oklch(0.985 0 0);
  --ring: oklch(0.673 0.182 276.9);
}

.dark[data-accent="indigo"],
.dark [data-accent="indigo"] {
  --primary: oklch(0.673 0.182 276.9);
}