UI
← Home

Swatch Picker

A grid of colour swatches — a single-select radio group navigated in two dimensions. ArrowLeft/Right move by one swatch, ArrowUp/Down by a whole row, Home/End to the first or last; selection follows focus. Each swatch is named by its colour; the rendered colour is decoration only.

  • Axe
  • Name
  • Roving
  • Focus

Preview

Installation

npx shadcn@latest add https://ui.publictheta.com/r/swatch-picker.json

Conformance

Verified against the @publictheta/ui-spec swatch-picker specification on both the React and vanilla reference implementations, across Chromium, Firefox, and WebKit.

  • Axe No WCAG 2 A/AA axe-core violations
  • Name The widget container exposes an accessible name
  • Roving Exactly one tab stop; Arrow keys move within the widget
  • Focus A visible focus indicator appears on keyboard focus (WCAG 2.4.7)

See the full conformance matrix across all components.