useThemeCustomizer
Retunes the active preset from the five settings in DESIGN.md: accent, neutral tint, radius, density and font. Each setting is optional and overrides the preset on its own. Light and dark are both derived from one input, and derived text colours are pushed until they pass WCAG AA.
Install: pnpm add-composable useThemeCustomizer
The five settings
Switch presets in the header while a setting is on: the overrides apply to whichever preset is active. Settings live in memory for the session; copy the CSS to keep them.
API
overrides(ThemeOverrides): The active settings: accent (hex), neutralHue (0–359), radius (px, the rounded-md step), density (comfortable | compact), font (a preset name). Reactive; unset keys follow the preset.set((key, value) => void): Change one setting. The override stylesheet updates on the next tick.reset((key?) => void): Clear one setting, or all of them. With none left, the stylesheet is removed.css(ComputedRef<string>): The overrides as CSS. Paste it into a stylesheet loaded after tokens.css to keep the theme.issues(ComputedRef<ContrastIssue[]>): Accent pairs below AA after derivation, using the same pairs scripts/tokens.mjs checks for the presets.isCustomized(ComputedRef<boolean>): True when any setting is set.