With no children it shows Light, Dark, and System. Add a ThemePickerItem for each app theme.
appearance-settings.tsx
ThemePickerPreview
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| theme | string | — | The theme to draw. system draws the light theme with the dark theme over its inline-end half. The theme reaches the box through the picker attribute (class="ocean"), so the theme CSS must work on any element, not only on :root (.ocean { --background: … }). |
| system | readonly [light: string, dark: string] | DEFAULT_SYSTEM_THEMES | The light and dark themes of a system preview. Default ["light", "dark"]. |
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
ThemePickerItem
<span>| Prop | Type | Default | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| children | ReactNode | — | The parts of the card: ThemePickerItemBox and ThemePickerItemLabel. Default: the box with the drawn app, and the label with the default caption. | ||||||||||||||||||||||
| class | string | — | |||||||||||||||||||||||
| value | string | — | The theme name: next-themes gets it on a check. | ||||||||||||||||||||||
From Base UIRadio.RootBase UI docs | |||||||||||||||||||||||||
| disabled | boolean | — | Whether the component should ignore user interaction. | ||||||||||||||||||||||
| required | boolean | — | Whether the user must choose a value before submitting a form. | ||||||||||||||||||||||
| read | boolean | — | Whether the user should be unable to select the radio button. | ||||||||||||||||||||||
| |||||||||||||||||||||||||
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. | ||||||||||||||||||||||
ThemePickerItemBox
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
ThemePickerItemLabel
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
ThemePickerItemCaption
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
ThemePickerItemDescription
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
ThemePicker
<div>| Prop | Type | Default | Description | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| children | ReactNode | — | The cards. Default: Light, Dark, and System. | ||||||||||||||||||||||||||
| class | string | — | |||||||||||||||||||||||||||
| value | string | null | — | The theme, for a controlled picker or another theme store; null checks no card (a required form field with no choice yet). Default: next-themes theme. | ||||||||||||||||||||||||||
| on | — | Called with the new theme inside the page change. Without value, next-themes gets it too. Update the page synchronously here: the page change takes its picture when this call returns. | |||||||||||||||||||||||||||
| transition | "blinds""blur""circle""diagonal""fade""none""wipe" | "circle" | The page change when the look changes. Default circle, from the press point. | ||||||||||||||||||||||||||
| size | "default""lg""sm" | "default" | Cards at least 120, 160, or 208px wide. | ||||||||||||||||||||||||||
| attribute | "class" | `data-${string}` | "class" | How a preview puts its theme on its box, as next-themes attribute. Default class. | ||||||||||||||||||||||||||
| labels | — | The group name and the default captions. Keep the object stable (a module constant). | |||||||||||||||||||||||||||
From Base UIRadioGroupBase UI docs | |||||||||||||||||||||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | ||||||||||||||||||||||||||
| read | boolean | false | Whether the user should be unable to select a different radio button in the group. | ||||||||||||||||||||||||||
| required | boolean | false | Whether the user must choose a value before submitting a form. | ||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | ||||||||||||||||||||||||||
| Tab | Moves focus to the checked card. The group is one tab stop. |
|---|---|
| Arrow keys | Checks the next or the previous card and changes the theme. |









