Skip to main content
  1. Docs
  2. Components
  3. Data display

Chip

An interactive tag: one that turns on and off, such as a filter, or a choice already made with a button that removes it.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.4.0
Renders
<span role="checkbox">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Keyboard

KeysWhat happens
TabTabTo each chip on its own; into a one-value group once, at its choice.
SpaceTurns the focused chip on or off.
←→In a one-value group, moves the choice; ↑ and ↓ too. Mirrored in right to left.
EnterSpaceOn a remove button, removes its chip.

02

Behaviour

Role and name
A selectable chip is a checkbox (a radio in a one-value group), named by its label; the group is named by label.
Chosen
A check, or the 2px edge where there's an icon, as well as the tint: never colour alone.
Remove
A button named "Remove Status: Active", "{label} हटाएँ" in Hindi.
Forced colours
Each chip is edged in ButtonText; a chosen one is drawn in Highlight.

03

Tested

On every change, before it ships.

  • axe, WCAG 2.2 A and AA, in light and dark, in Chromium on every pull request
  • Firefox and WebKit every night
  • Screenshots in both schemes at every density
  • Right to left: the arrow keys mirror
Next — ChipChangelog