Skip to content
Haze UI

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.

TokenUse it for
--backgroundThe page behind everything.
--cardCards, inputs, and panels on the page.
--popoverMenus, popovers, and dialogs that float.
--mutedQuiet fills: tracks, badges, and subtle wells.
--accentHover and active highlight fill.
--foregroundPrimary text and high-contrast icons.
--muted-foregroundSupporting text, descriptions, and captions.
--borderDefault opaque 1 px hairlines between panels.
--border-strongEmphasized control edges and hovered card borders.
--primaryPrimary buttons and checked controls.
--brandBrand accent, chart series, and info badges.
--successPositive confirmation states and status dots.
--warningCaution states and placeholder badges.
--destructiveDanger 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);
}
Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog