Put one PalettePickerItem for each palette, with its name, radio dot, and strip. Name the group with aria-label.
theme-palette.tsx
PalettePicker
<div>| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||||||||||||||||||||||||||||||||
| size | "default""lg" | — | default 16px or lg 20px items; an item prop wins. | |||||||||||||||||||||||||||||||||||||||||
| palettes | — | 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. | |||||||||||||||||||||||||||||||||||||||||
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. | |||||||||||||||||||||||||||||||||||||||||
PalettePickerItem
<span>| Prop | Type | Default | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | |||||||||||||||||||||||
| palette | — | The palette of this item. Its id is the radio value. | |||||||||||||||||||||||
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. | ||||||||||||||||||||||
PalettePickerName
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
PalettePickerIndicator
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
PalettePickerStrip
<div>| 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 | — | 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" | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | Moves focus to the checked palette. |
|---|---|
| Arrow keys | Moves the choice to the next palette. Right to left, the keys turn. |
Built with
Installs with Palette Picker
- Components
- Palette Strip,Radio Group











