AiKitThemeCustomizer

Appearance settings for end users: Color (accent swatches), Radius, Density and Mode (light, dark, auto), plus a Reset button. Without value and defaultValue it reads and changes the nearest AiKitProvider, so every kit component under that provider updates at once and persistKey on the provider saves the choice. Pass value and onChange to control it yourself (for example to store the settings on the server and feed them to AiKitProvider as props), or defaultValue for uncontrolled use without a provider. accents limits the offered colors to a subset of AI_KIT_ACCENTS; every accent passes contrast checks in both schemes. sections hides sections, for example { mode: false } when the host app owns the color scheme. It fits a 360px panel as well as a settings page column. See Theming (/docs/theming).

Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react
Examples
Wide, with a live sample
Narrow, controlled
API reference
Prop
Type
Required
value
AiKitThemeSettings
No
Controlled settings; without `value` and `defaultValue` the nearest `AiKitProvider` is used
defaultValue
AiKitThemeSettings
No
Initial settings for uncontrolled use without a provider
onChange
(settings: AiKitThemeSettings) => void
No
Called with the full settings after every change and after reset
accents
readonly AiKitAccent[]
No
Accents offered in the Color section, a subset of `AI_KIT_ACCENTS`
sections
Partial<Record<'color' | 'radius' | 'density' | 'mode', boolean>>
No
Hides sections, for example when the host controls the color scheme itself
labels
Partial<AiKitThemeCustomizerLabels>
No
Overrides of the default English labels