Controlled chip row with single-select (radiogroup) or multi-select (group of checkboxes) — wraps each PixelChip in a semantic toggle button.
Selection is bound — value + onChange (React), v-model (Vue), [(value)] or forms (Angular) — or starts from defaultValue; chips stay presentational.
Single mode renders role=radiogroup with roving tabindex + arrow / Home / End navigation.
Multi mode renders role=checkbox per chip with aria-checked and Space/Enter toggle.
Surface-aware: forwards pixel or linear surface to chip wrappers for consistent borders.
aria-label / aria-labelledby make the group an accessible landmark.
Status
stable
Category
data
Since
v1.9.0
API
import { PixelChipGroup } from '@pxlkit/ui-kit';
Prop
Type
Default
Description
value
string[]
—
Controlled selection.
defaultValue
string[]
—
Uncontrolled initial selection.
onChange
(next: string[]) => void
—
Called with the new selection, after each change.
multiple
boolean
false
Any number of chips can be selected (checkboxes) instead of one (radios).
surface
'pixel' | 'linear'
—
Surface override; defaults to the nearest provider.
aria-label
string
—
Accessible name (required when single-select so SR users hear the group).
aria-labelledby
string
—
Id of the element that names the group, in place of aria-label.
children* (required)
React.ReactNode
—
The chips, each with a value; other content renders as is.
Also takes the native attributes and event handlers of <div> (HTMLAttributes<HTMLDivElement>).
ref points to <div>.
Accessibility
WCAG target: 2.1 AA
radiogroup
checkbox-group
Each child chip must declare a string value prop. In single (radiogroup) mode an accessible name (aria-label or aria-labelledby) is required so screen readers announce the group; multi mode renders a bare div unless a name is provided. The wrapping button owns role/aria-checked/tabindex; the PixelChip child remains purely visual. Selection and keyboard focus read apart: the linear surface rings a selected chip and sets the focus ring off it; the pixel surface frames a selected chip inside its border and lights up the chip's edge for focus.
Keyboard
Key
Action
When
Tab
Moves focus into / out of the group; in single mode only the selected (or first) chip is tab-reachable.