Pickers
Color Menu
Text and background color pickers: a compact swatch grid and a labelled list.
Recently used
Text color
Background color
Text color
Background color
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/ColorMenuExample.tsx
Examples
Grid and list
Recently used
Text color
Background color
Text color
Background color
API Reference
ColorGrid
| Prop | Type | Default |
|---|---|---|
value | ColorValue | ColorValue[] | |
recent | ColorValue[] | |
onSelect | (value: ColorValue) => void |
ColorMenuList
| Prop | Type | Default |
|---|---|---|
value | ColorValue | ColorValue[] | |
lastUsed | { value: ColorValue; shortcut?: ReactNode }[] | |
onSelect | (value: ColorValue) => void | |
highlighted | ColorValue | |
autoFocus | boolean | false |
ColorSwatch
| Prop | Type | Default |
|---|---|---|
value | ColorValue | |
selected | boolean | false |
Accessibility
ColorGrid: each section is a labelled group of toggle buttons ("Yellow background");aria-pressedmarks the current colors. Tab moves between swatches, Enter/Space picks.ColorMenuList: one listbox; ↑/↓ and Home/End move, Enter or Space picks;aria-selectedmarks the current color. PassautoFocusto focus it on open.- Swatches pair color with a text label (tooltip / row label), never color alone.
Usage
- Use the grid in a text toolbar and the list in block menus.
- Don't use these for arbitrary colors: they offer the ten palette colors only.
© 2026 Motion. Internal documentation.