AiKitProvider

Apply the kit theme to a subtree. Render it inside your MantineProvider around the kit components; host components outside it keep the host theme. Settings: accent sets the primary color (gray, blue, indigo, violet, grape, pink), radius sets the default radius (sharp, default, round), density sets control heights and paddings (default, compact), colorScheme switches the color scheme of the whole app through Mantine. theme merges Mantine overrides on top of the kit theme, and tokens sets --ae-* variables for the subtree (keys without the --ae- prefix); tokens win over settings. The provider re-declares the CSS variables on its own element and on portals it opens, so menus and modals inside match. persistKey saves changes made through useAiKitTheme().setSettings to localStorage and restores them. useAiKitTheme returns the effective settings, the defaults from props, setSettings, reset and the resolved aiKit theme values; it throws outside a provider, and useOptionalAiKitTheme returns null instead. Wrap host UI placed inside a kit subtree in AiKitHostScope to give it the host theme back. See Theming (/docs/theming) for nesting and token details.

Getting Started
$pnpm add @sinups/ai-kit @mantine/core @mantine/hooks @tabler/icons-react
Examples
Settings
API reference
Prop
Type
Required
theme
MantineThemeOverride
No
Overrides applied on top of the kit theme, for example `components.Button.defaultProps`
tokens
AeTokenOverrides
No
`--ae-*` token values for this subtree, keys without the `--ae-` prefix; they win over settings
persistKey
string
No
localStorage key; when set, changes made through `useAiKitTheme` are saved and restored
children
React.ReactNode
No
Kit components; must be rendered inside the host `MantineProvider`
accent
AiKitAccent
No
Sets `theme.primaryColor` and `theme.primaryShade`; unset keeps the host primary color
radius
AiKitRadius
No
Sets `theme.defaultRadius` (`sharp` → xs, `default` → md, `round` → lg); kit radii follow it
density
AiKitDensity
No
Kit control heights and paddings; `default` matches the original chat surface
colorScheme
MantineColorScheme
No
Applied through Mantine `useMantineColorScheme`, so it changes the color scheme of the whole app