---
title: "Palette Picker"
description: "Pick one named palette from tiles or rows. Each item shows its name and a Palette Strip, and the arrow keys move the choice."
url: https://gelatinui.com/components/palette-picker
markdown_url: https://gelatinui.com/components/palette-picker.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/palette-picker"
version: "2026-11-09"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Palette Picker

> Pick one named palette from tiles or rows. Each item shows its name and a Palette Strip, and the arrow keys move the choice.

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

## When to use it

Best for: Pick one named palette from a few, as tiles or rows, on a theme settings page.

- Use it when people pick a whole set of colors, not one color.
- Use `layout="stack"` for a narrow panel or a phone.
- Use `name` to send the palette id with a form.

## When not to use it

- To pick one color, use a [Color Swatch Picker](https://gelatinui.com/components/color-swatch-picker.md).
- To show a palette with no choice, use a [Palette Strip](https://gelatinui.com/components/palette-strip.md).

## Notes for agents

- The value is the `id` of a palette in `palettes`.
- Every Base UI Radio Group prop passes through: `disabled`, `readOnly`, `required`, `inputRef`.
- Name the group with `aria-label` or `aria-labelledby`. Each radio has the palette name.
- With no children, each item shows a name, a radio dot, and a Palette Strip.

## Anatomy

```text
PalettePicker
├─ PalettePickerItem (0..n)
├─ PalettePickerName (0..n)
├─ PalettePickerIndicator (0..n)
└─ PalettePickerStrip (0..n)
```

## API reference

### PalettePicker

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `size` | `"default" \| "lg"` |  | `default` 16px or `lg` 20px items; an item prop wins. |
| `palettes` | `readonly ColorPalette[]` |  | The palettes to pick from, in order. The value of each is its `id`. |
| `layout` | `"grid" \| "stack"` | "grid" | `grid` (default): wrapping tiles. `stack`: one row per palette, for a narrow panel. |
| `children` | `ReactNode` |  | Custom items. Default: one `PalettePickerItem` per palette. |

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

### PalettePickerItem

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `className` | `string` |  |  |
| `palette` | `ColorPalette` |  | The palette of this item. Its `id` is the radio value. |

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

### PalettePickerName

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

### PalettePickerIndicator

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

### PalettePickerStrip

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `colors` | `readonly string[]` |  | The colors, any CSS colors, when there is no palette. |
| `orientation` | `"horizontal" \| "vertical"` |  | `horizontal` (default) fills the width; `vertical` stacks the parts. |
| `gap` | `boolean` |  | 2px gaps between the parts; each part keeps 2px corners and its own edge. |
| `children` | `function \| ReactNode` |  | Custom parts: `PaletteStripColor` elements, or a function that renders each color (`({ color, weight, index }) => <PaletteStripColor … />`). Default: one part per color. |
| `labels` | `Partial<{ empty: string; }>` |  | The words (`PALETTE_STRIP_LABELS`), to translate them. Keep the object stable. |
| `size` | `"default" \| "lg" \| "sm"` |  |  |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| PalettePicker | `palette-picker` |  |  |  |
| PalettePickerItem | `palette-picker-item` | `data-checked`, `data-disabled` | `--radius` | `motion-timing` |
| PalettePickerName | `palette-picker-name` |  |  |  |
| PalettePickerIndicator | `palette-picker-indicator` | `data-starting-style` |  | `motion-timing` |
| PalettePickerStrip | `palette-picker-strip` |  |  |  |

## Usage

Put one `PalettePickerItem` for each palette, with its name, radio dot, and strip. Name the group with `aria-label`.

```tsx title="theme-palette.tsx"
import {
  PalettePicker,
  PalettePickerIndicator,
  PalettePickerItem,
  PalettePickerName,
  PalettePickerStrip,
} from "@/components/ui/pro/palette-picker";

const PALETTES = [
  { id: "cool", name: "Cool", colors: ["#D6CCF5", "#8E7AE6", "#2E2A5C"] },
  { id: "warm", name: "Warm", colors: ["#FFE1C2", "#F28C38", "#5C2A0E"] },
  { id: "forest", name: "Forest", colors: ["#D3EBD5", "#46A758", "#1B3A21"] },
];

export function ThemePalette() {
  return (
    <PalettePicker aria-label="Theme palette" palettes={PALETTES} defaultValue="cool">
      {PALETTES.map((palette) => {
        return (
          <PalettePickerItem key={palette.id} palette={palette}>
            <PalettePickerName />
            <PalettePickerIndicator />
            <PalettePickerStrip />
          </PalettePickerItem>
        );
      })}
    </PalettePicker>
  );
}
```

## 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/palette-picker
```

It adds 14 registry items: 11 files, 1998 lines, and the npm packages `@base-ui/react`, `clsx`, `react-aria-components`, `tailwind-merge`, `tailwind-variants`.

## Built on

- [Palette Strip](https://gelatinui.com/components/palette-strip.md)
- [Radio Group](https://gelatinui.com/components/radio-group.md)

## 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

- [Palette Strip](https://gelatinui.com/components/palette-strip.md)
- [Radio Group](https://gelatinui.com/components/radio-group.md)
- [Color Swatch Picker](https://gelatinui.com/components/color-swatch-picker.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Moves focus to the checked palette. |
| Arrow keys | Moves the choice to the next palette. Right to left, the keys turn. |

## Motion

| Part | Motion |
| --- | --- |
| Check | press · 100ms · the radio dot grows in, and the edge and fill change color |
