Chips
Assist, suggestion, filter and input chips for compact actions and entries, in a chip set.
import { AssistChip, SuggestionChip, FilterChip, InputChip, ChipSet } from '@windmorph/react';Keyboard
| Key | Action | Where |
|---|---|---|
| Tab | Moves focus to the chip. A ChipSet is one Tab stop: Tab enters it and the next Tab leaves it. | |
| Enter or Space | Activates an assist or suggestion chip, selects or deselects a filter chip, and runs an input chip's onPress or its remove button. | |
| Enter | Follows an assist chip with href. Space scrolls the page, as on any link.Assist chip with href | Assist chip with href |
| Backspace or Delete | Removes a chip that has onRemove, from the chip or its remove button. A disabled chip ignores them.Removable filter and input chips | Removable filter and input chips |
| Arrow Right or Arrow Down | Moves focus to the next chip, or to a chip's remove button, without selecting it. It stops at the last one.In a ChipSet without single selection | In a ChipSet without single selection |
| Arrow Left or Arrow Up | Moves focus to the previous chip or remove button. It stops at the first one.In a ChipSet without single selection | In a ChipSet without single selection |
| Home or End | Moves focus to the first or the last chip in the set.In a ChipSet without single selection | In a ChipSet without single selection |
| Arrow Right or Arrow Down or Arrow Left or Arrow Up | Moves to the next or previous chip and selects it, wrapping from one end to the other (the WAI-ARIA radio group its radiogroup role announces, as RadioGroup does).In a single-select ChipSet | In a single-select ChipSet |
| Home or End | Selects the first or the last chip.In a single-select ChipSet | In a single-select ChipSet |
- In a right-to-left layout Arrow Left and Arrow Right swap.
- Leaving a
ChipSetwith Tab and coming back returns focus to the chip that had it; a single-select set returns it to the selected chip. A pointer press focuses the chip it lands on. - In a multiple-select set the arrow keys only move focus; Enter or Space selects. M3 lists the arrows as moving focus for every chip set; a single-select set follows the radio group pattern instead, because its chips are announced as radio buttons and that is what screen reader users expect of them (2026-10-15).
Screen reader
- Role
AssistChipandSuggestionChipare abutton(an assist chip withhrefis alink).FilterChipis a togglebutton, or aradioin a single-selectChipSet.ChipSetis agroup, or aradiogroupwithselectionMode="single".- Accessible name
- The chip's label (
children). The remove button is named fromlabels.removeplus the label ("Remove Alex"). AChipSettakesaria-labeloraria-labelledby, which its types require. A filter chip withonRemovekeeps everyaria-*attribute butaria-hiddenon its toggle, which is still the chip's button. An input chip withonPressputs the attributes that name or describe a control (aria-label,aria-describedby,aria-expanded,aria-controls) on its action's button, unless its container has arolefor them to name. - States announced
- A filter chip announces pressed (
aria-pressed), or checked (aria-checked) in a single-select set. An input chip withonPressandselectedannounces pressed; a selected input chip withoutonPressis described as "Selected" (labels.selected), on its remove button or as hidden text. Disabled on every chip; a disabledChipSetdisables every chip in it and setsaria-disabledon the group.
- Leading icons, avatars, the filter check, the trailing icon and the close icon are decorative and hidden from assistive tech (
aria-hidden). - An input chip with neither
onPressnoronRemoveis static text, with no role and no focus stop.
Focus
- Each chip is a focus stop. A filter chip with
onRemove, and an input chip withonPressandonRemove, are two stops: the chip and its remove button. - An input chip with only
onRemoveis one stop, its remove button, and the focus ring circles the whole chip, as M3 asks. - Keyboard focus shows M3's focus indicator: a 3px
secondaryoutline 2px outside the chip, round the whole chip for its main button, and inside the remove button for that one, and a flat chip's border darkens. Pointer presses show no ring. - When the focused chip is removed, focus moves to the next stop in the
ChipSet, or the previous one at the end, or the set itself once it is empty, so keyboard users keep their place.
Touch target
- Chips are at least 32px tall. An invisible
TouchTargetgives each chip a 48px-tall touch target without changing its layout. - A wrapping
ChipSetkeeps its rows 48px apart, top to top (16px between 32px chips), so the targets of two rows never overlap and every chip takes presses over its full 48px, as M3 asks of chips wherever they are placed. A smallergap-y-*inclassNamebrings the rows closer, at the cost of the targets: where two overlap, the chip below takes the press. - The remove button is 24px (22px in a flat chip at density -2 and -3) with a
TouchTargetof its own, 48px tall and reaching 7px past the chip's end. Where the remove button is the chip's only control (an input chip with justonRemove), the target is 48px wide. Where the chip's main part takes presses too (a filter chip withonRemove, an input chip withonPressandonRemove), it is 41px wide: M3 puts the icon 8px from the label, which leaves no room for 48px without covering the label, so the target stops where the label ends and a press on the label always goes to the main part. A chip with a remove button is at least 88px wide, as M3 asks, which leaves its main part at least 53px. - A scrolling
ChipSet(layout="scroll") pads its row so the touch targets and focus rings stay inside the scroll area, and keeps a thin scrollbar (inoutline), so a mouse user sees that more chips lie beyond the edge and can reach them. Where every chip must be seen at once, use the default wrapping layout. - With
density(or the theme's), chips lose 4px a step, to 24px at -2 and -3, and keep their targets, as M3 asks of chips at every density: 48px, and 41px wide for a remove button beside a toggle or an action. A wrappingChipSetputs as much more between rows (20px at -1, 24px at -2 and -3), so they stay 48px apart, and a scrolling one pads its row by half of that above and below, so its targets stay inside the scroll area.
Motion
Under reduced motion a filter chip's check and its padding change appear at once instead of sliding open, and the check fades in. The press ripple appears at full size without growing. Colours and elevation still fade.
What you need to do
- Give every
ChipSeta name witharia-label, oraria-labelledbypointing at a visible heading. - Keep chip labels short and unique within a set, so the remove buttons' names ("Remove Alex") stay distinct.
- Pass
labelsto translate the remove button's name (labels.remove) and the word that describes a selected input chip (labels.selected). - Use
outline="strong"where nothing else shows that a flat chip is interactive, so its border meets 3:1 contrast.