Theming

Creu themes with one attribute. Every color, shadow, radius and duration is a --creu-* variable defined on :root in tokens.css, and that block is the dark theme. Adding data-theme="light" to <html> swaps the variable values. No component knows a theme exists; they all read var(--creu-*).

The pressed-in neumorphic shadows (--creu-inset, --creu-inset-soft, --creu-inset-accent, --creu-raise) also differ per theme. They live in the same two blocks.

Key tokens

Surfaces

TokenDarkLight
--creu-bg#121212#ffffff
--creu-surface#121212#ffffff
--creu-surface-raised#1a1a1a#f7f7f8
--creu-surface-inset#0d0d0d#ededf0

Text

TokenDarkLight
--creu-fg#f5f5f5#252629
--creu-fg-muted#a0a0a0#74767b

Lines

TokenDarkLight
--creu-border#292929#e9e9eb
--creu-border-strong#3f3f46#d4d4d8

Accent

TokenDarkLight
--creu-accent#167c51#2bc585
--creu-accent-hover#1a905e#24b478
--creu-accent-fg#ffffff#212b27
--creu-accent-softrgba(99, 227, 146, 0.12)rgba(43, 197, 133, 0.12)
--creu-ring#63e392#2bc585

Radii

TokenValue
--creu-radius-sm8px
--creu-radius-md12px
--creu-radius-lg16px
--creu-radius-pill999px

Motion

TokenValue
--creu-easecubic-bezier(0.4, 0, 0.2, 1)
--creu-ease-outcubic-bezier(0.23, 1, 0.32, 1)
--creu-duration160ms
--creu-duration-fast100ms

The full set, including the chart palette, is in tokens.css of the package.

Try it

Badge

The switch drives the same data-theme attribute as the corner toggle; the resolved theme right now is dark.

Custom tokens

Every component reads tokens through var(), so overriding a variable on :root rethemes the whole kit. Load creu.css first, then set your values:

CSS
/* After creu.css: retheme the whole kit from one place */
:root {
  --creu-accent: #7c5cff;
  --creu-accent-hover: #9a80ff;
  --creu-radius-md: 10px;
}

A third theme works the same way: a selector that resets the variables, for example [data-theme="sepia"]. For the switching UI, use the exported ThemeSwitcher component or the useCreuTheme hook.