Skip to content

Color swatch picker

Selects a color from a set of swatches.

Accent color
color-swatch-picker-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Composition

  • ColorSwatchPicker

    Owns the selected color.

    • ColorSwatchPickerItemRepeats

Disabled

Team color
color-swatch-picker-disabled-demo.tsx

Controlled value

Give each item an aria-label.

Label color
Selected: Rose
color-swatch-picker-controlled-demo.tsx

API reference

Color swatch picker takes the props of React Aria ColorSwatchPicker (opens in a new tab).