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
| Token | Dark | Light |
|---|---|---|
--creu-bg | #121212 | #ffffff |
--creu-surface | #121212 | #ffffff |
--creu-surface-raised | #1a1a1a | #f7f7f8 |
--creu-surface-inset | #0d0d0d | #ededf0 |
Text
| Token | Dark | Light |
|---|---|---|
--creu-fg | #f5f5f5 | #252629 |
--creu-fg-muted | #a0a0a0 | #74767b |
Lines
| Token | Dark | Light |
|---|---|---|
--creu-border | #292929 | #e9e9eb |
--creu-border-strong | #3f3f46 | #d4d4d8 |
Accent
| Token | Dark | Light |
|---|---|---|
--creu-accent | #167c51 | #2bc585 |
--creu-accent-hover | #1a905e | #24b478 |
--creu-accent-fg | #ffffff | #212b27 |
--creu-accent-soft | rgba(99, 227, 146, 0.12) | rgba(43, 197, 133, 0.12) |
--creu-ring | #63e392 | #2bc585 |
Radii
| Token | Value |
|---|---|
--creu-radius-sm | 8px |
--creu-radius-md | 12px |
--creu-radius-lg | 16px |
--creu-radius-pill | 999px |
Motion
| Token | Value |
|---|---|
--creu-ease | cubic-bezier(0.4, 0, 0.2, 1) |
--creu-ease-out | cubic-bezier(0.23, 1, 0.32, 1) |
--creu-duration | 160ms |
--creu-duration-fast | 100ms |
The full set, including the chart palette, is in tokens.css of the package.
Try it
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:
/* 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.