AccentPicker
v1.0.3Updated 27 Aug 2026Brand-accent swatch row that switches the data-theme accent (orange/blue/green/violet/rose). Controlled, or self-persisting to localStorage. Each swatch renders its real primary token — no hardcoded color.
Preview
Live · 7 stories▸Why this is recommendedaccentbrand-themecolorswatch+3
The default, out-of-the-box AccentPicker.
- ✓Settings > appearance
- ✓Theme submenu inside ThemeToggle
- ✓Whitelabel accent selection
- 5 built-in accents (or a custom set)
- Controlled or uncontrolled (self-persists to localStorage)
- Token-only swatches via element-scoped data-theme
- Keyboard + ARIA radiogroup
- i18n: labels prop overrides the group aria-label and accent names; merged over DEFAULT_ACCENT_PICKER_LABELS
- ✕Arbitrary color selection (use ColorPicker)
- ✕Non-brand palettes
Install
Ask your agent, or call the MCP tool directly. The resolved bundle is written into your project.
Usage
Tick variants in the left menu — each adds a tab with that variant’s real story source, the same code the preview above renders.
Props
valueControlled active accent
—defaultValueUncontrolled initial accent
—onValueChangeCalled with the chosen accent value
—themesSelectable accents (default 5 built-ins)
—persistUncontrolled: write data-theme on <html> + localStorage (default true)
—labelsOverride built-in UI strings (i18n): group aria-label + accent names. Merged over DEFAULT_ACCENT_PICKER_LABELS
—