Theming
Semantic color tokens, dark and light surfaces, opaque hairlines, and how to customize the radius or brand hue across every component.
Light & dark mode
Haze ships with both dark and light palettes out of the box. Dark is the default on :root; set data-theme="light" on <html> (or use the Theme switch component) to switch the entire application to light mode.
Color tokens
Components only use semantic roles, never raw palette colors. Change a variable in src/styles/haze.css and every installed component and block follows.
| Token | Use it for |
|---|---|
--background | The page behind everything. |
--card | Cards, inputs, and panels on the page. |
--popover | Menus, popovers, and dialogs that float. |
--muted | Quiet fills: tracks, badges, and subtle wells. |
--accent | Hover and active highlight fill. |
--foreground | Primary text and high-contrast icons. |
--muted-foreground | Supporting text, descriptions, and captions. |
--border | Default opaque 1 px hairlines between panels. |
--border-strong | Emphasized control edges and hovered card borders. |
--primary | Primary buttons and checked controls. |
--brand | Brand accent, chart series, and info badges. |
--success | Positive confirmation states and status dots. |
--warning | Caution states and placeholder badges. |
--destructive | Danger actions and validation errors. |
Radius scale
One base variable --radius: 0.4rem drives the entire corner hierarchy from checkbox marks (rounded-xs) to panels (rounded-xl) and dialogs (rounded-2xl).
src/styles/haze.css
css
:root {
--radius: 0.4rem;
--brand: oklch(0.74 0.13 255);
}