Components › Forms & input › Choice › Color picker

Color picker

canon

Grid of colour swatches (radiogroup, arrows, optional 'no colour' row) and its canonical wrapper: popover on desktop, sheet on the phone, InSheet panel inside a dialog.

acrm !4337 (one swatch grid instead of four copies: EventLabelPicker, EventTypeFilter, MailLabelDialog use ColorPicker; SegmentIconPicker keeps its own panel and uses ColorSwatches for SEGMENT_TONES — validator exception), !4347 (phone: swatches span the width, 44 px targets, segment icon tiles capped at --tap-min), !4354 (stories + usage/a11y), !4363 (a11y: 'Bez barvy' is a radio of the same group with a check on the right; roving tabindex — one Tab stop on the chosen option; focus ring and selection ring read apart). Canon 1. 10. 2026 (AD) after before/after app screenshots (1440 + 390, light/dark) and the States story. Custom hex colour in the segment picker unchanged; dropping it is a separate owner decision.

Used in 6 files · 5 areas · 6× — components/calendar, components/mail, components/meetings, components/segment, pages/TymyPage

Default

event label — 6 × 4 grid, the chosen colour carries a ring; a pick closes the panel
components--color-picker--defaultOpen standalone ↗Code

Variants

grid (default) — 24-colour palette, 24 px round swatches, 6 columns, 'Bez barvy' optional
tones — one row of the 7 segment tones (variant='tones'); a custom hex stays a separate input next to it
components--color-picker--variantsOpen standalone ↗Code

States

nothing selected — no ring anywhere; the first swatch takes focus on open
'Bez barvy' chosen — a radio of the same group, check on the right; the one Tab stop
colour chosen — 'Bez barvy' below is not checked (no check, slot kept)
keyboard focus on a swatch (Tomato) while another (Sage) is chosen — focus ring and selection ring read apart
The selection is a ring (canvas gap + ink ring), not a check mark: a white check on the light tones (banana, citron) measured 2.1:1, below the 3:1 of a graphic object. Arrows move focus across the grid (up/down jump a row; down from the last row onto "Bez barvy", up back), Home and End go to the ends. One Tab stop (roving tabindex): the chosen option, else the first swatch.
components--color-picker--statesOpen standalone ↗Code

Composition

Nový štítek
NázevSchůzka s klientem
Barva
phone (390 px) — 'Nový štítek' dialog, colour field opened: bottom sheet with grab, title (= ariaLabel), 6 × 1fr grid with 44 px targets, 'Bez barvy', full-width Hotovo
components--color-picker--compositionOpen standalone ↗Code