A compact color picker styled as a settings cell with preset palettes and custom color input.
import {CellColorPicker} from "@heroui-pro/react";
<CellColorPicker>
<CellColorPicker.Trigger>
<CellColorPicker.Label />
<CellColorPicker.ValueDisplay />
<CellColorPicker.Swatch />
</CellColorPicker.Trigger>
<CellColorPicker.Popover>{/* ... */}</CellColorPicker.Popover>
</CellColorPicker>;A single cell with a label, the hex value, and a swatch that opens a color area and hue slider.
HeroUI follows the BEM methodology to ensure component variants and states are reusable and easy to customize.
The Cell Color Picker component uses these CSS classes:
.cell-color-picker: Root wrapper.cell-color-picker__trigger: The visible cell row button.cell-color-picker__label: Leading text label.cell-color-picker__value-display: Hex value text display.cell-color-picker__swatch: Color swatch preview.cell-color-picker__popover: Dropdown color picker panel.cell-color-picker__trigger--default: Default variant trigger styling.cell-color-picker__trigger--secondary: Secondary variant trigger stylingThe root component. Wraps HeroUI ColorPicker with cell-style layout.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'default' | 'secondary' | 'default' | Visual style variant |
Also supports all RAC ColorPicker props except children (defaultValue, value, onChange, etc.).
The visible cell row button. Wraps RAC Button.
Also supports all RAC Button props.
Leading text label rendered as a span.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Label text |
Also supports all native span HTML attributes.
Displays the current color as a hex value (e.g. #FF5733). Automatically reads from the color picker state.
Also supports all native span HTML attributes.
Color swatch preview. Wraps HeroUI ColorSwatch.
Also supports all HeroUI ColorSwatch props.
Dropdown color picker panel. Wraps HeroUI ColorPicker.Popover.
| Prop | Type | Default | Description |
|---|---|---|---|
placement | Placement | 'bottom end' | Popover placement relative to the trigger |
Also supports all HeroUI ColorPicker.Popover props.
Resources