---
title: "Theme Picker"
description: "Pick light, dark, system, or an app theme from cards that show a small app in each one. The page switches with a short motion, such as a circle that grows."
url: https://gelatinui.com/components/theme-picker
markdown_url: https://gelatinui.com/components/theme-picker.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/theme-picker"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Theme Picker

> Pick light, dark, system, or an app theme from cards that show a small app in each one. The page switches with a short motion, such as a circle that grows.

Page: https://gelatinui.com/components/theme-picker

## When to use it

Best for: The Appearance setting of an app: light, dark, system, and any app theme, each shown as a preview.

- Use it in a settings page, where there is room for a preview of each theme.
- Add one `ThemePickerItem` per app theme: each card draws itself with the colors of its theme.
- Use `ThemePickerItemDescription` for a second line under the caption.
- Pass `value` and `onValueChange` to keep the theme in your own store.

## When not to use it

- For a small light and dark switch in a header, use a [Theme Switch](https://gelatinui.com/components/theme-switch.md).
- For a choice that is not a theme, use a [Radio Group](https://gelatinui.com/components/radio-group.md).

## Notes for agents

- It needs next-themes, unless you pass `value` and `onValueChange`.
- A theme preview puts its theme on the card box (`class` by default, or `data-*` with `attribute`). Your theme CSS must work on any element, not only on `:root`.
- Uncontrolled, it shows a placeholder of the same size until hydration.
- A `ThemePickerItem` with no children shows the drawn app and the default caption. For your own caption, use `ThemePickerItemBox` and `ThemePickerItemLabel` with a `ThemePickerItemCaption`.
- Put your own content in `ThemePickerItemBox`, in place of the drawn app.
- Keep `labels` stable (a module constant).

## Anatomy

```text
ThemePicker
├─ ThemePickerPreview (0..n)
├─ ThemePickerItem (0..n)
├─ ThemePickerItemBox (0..n)
├─ ThemePickerItemLabel (0..n)
├─ ThemePickerItemCaption (0..n)
└─ ThemePickerItemDescription (0..n)
```

## API reference

### ThemePickerPreview

| 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: … }`). |
| `systemThemes` | `readonly [light: string, dark: string]` | DEFAULT_SYSTEM_THEMES | The light and dark themes of a `system` preview. Default `["light", "dark"]`. |

### ThemePickerItem

| 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. |
| `className` | `string` |  |  |
| `value` | `string` |  | The theme name: next-themes gets it on a check. |

Also takes every prop of Base UI `Radio.Root`: https://base-ui.com/react/components/radio

### ThemePickerItemBox

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### ThemePickerItemLabel

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### ThemePickerItemCaption

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### ThemePickerItemDescription

No props of its own: `className`, `children`, and every other prop go to the element it renders.

### ThemePicker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` |  | The cards. Default: Light, Dark, and System. |
| `className` | `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`. |
| `onValueChange` | `function` |  | 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` | `Partial` |  | The group name and the default captions. Keep the object stable (a module constant). |

Also takes every prop of Base UI `RadioGroup`: https://base-ui.com/react/components/radio-group

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| ThemePickerPreview | `theme-picker-preview` |  |  |  |
| ThemePickerItem | `theme-picker-item` | `data-checked`, `data-disabled`, `data-invalid`, `data-readonly` | `--radius` | `motion-timing` |
| ThemePickerItemBox | `theme-picker-item-box` | `data-checked`, `data-disabled`, `data-invalid`, `data-readonly` | `--radius` | `motion-timing` |
| ThemePickerItemLabel | `theme-picker-item-label` | `data-checked`, `data-disabled`, `data-invalid`, `data-readonly` | `--radius` | `motion-timing` |
| ThemePickerItemCaption | `theme-picker-item-caption` | `data-checked`, `data-disabled`, `data-invalid`, `data-readonly` | `--radius` | `motion-timing` |
| ThemePickerItemDescription | `theme-picker-item-description` | `data-checked`, `data-disabled`, `data-invalid`, `data-readonly` | `--radius` | `motion-timing` |
| ThemePicker | `theme-picker` |  | `--theme-picker-card` |  |

## Usage

With no children it shows Light, Dark, and System. Add a `ThemePickerItem` for each app theme.

```tsx title="appearance-settings.tsx"
import {
  ThemePicker,
  ThemePickerItem,
  ThemePickerItemBox,
  ThemePickerItemCaption,
  ThemePickerItemLabel,
} from "@/components/pro/controls/theme-picker";

export function AppearanceSettings() {
  return (
    <ThemePicker>
      <ThemePickerItem value="light" />
      <ThemePickerItem value="dark" />
      <ThemePickerItem value="ocean">
        <ThemePickerItemBox />
        <ThemePickerItemLabel>
          <ThemePickerItemCaption>Ocean</ThemePickerItemCaption>
        </ThemePickerItemLabel>
      </ThemePickerItem>
      <ThemePickerItem value="system" />
    </ThemePicker>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/theme-picker
```

It adds 20 registry items: 17 files, 2976 lines, and the npm packages `@base-ui/react`, `clsx`, `next-themes`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Theme Switch](https://gelatinui.com/components/theme-switch.md)
- [Radio Group](https://gelatinui.com/components/radio-group.md)
- [Choice Card](https://gelatinui.com/components/choice-card.md)

## Keyboard

| Keys | Action |
| --- | --- |
| 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. |

## Accessibility

It is a Base UI Radio Group named "Theme" (change it with `labels` or `aria-label`). Each card is a radio named by its caption.

A `ThemePickerItemDescription` describes its radio (`aria-describedby`).

The preview is `aria-hidden`: the caption is the name, not the drawn app.

The checked card shows a ring outside the preview and a filled radio circle, so the check reads on every theme.

## Motion

| Part | Motion |
| --- | --- |
| Check and hover | fade · 150ms · ease-out (0, 0, 0.2, 1) |
| Page change | theme · 450ms · ease-panel (0.2, 0.4, 0.2, 1) · the new theme grows in a circle from the press |
