Chip
Chips are compact interactive buttons that represent a selectable option, such as a filter or category. They can be toggled on and off by the user.
Quarantine
Chips are compact interactive buttons that represent a selectable option, such as a filter or category. They can be toggled on and off, carry an optional leading and trailing icon, and communicate a clear selected state — reach for a chip when the user is choosing among options, not triggering an action.
Anatomy
Section titled “Anatomy”- Chip
- Leading icon
- Label
- Trailing icon
When to use it
Section titled “When to use it”Use a Chip when:
- Users apply or remove filters within a search or listing experience.
- Users pick from a group of options where more than one choice is allowed.
- You need to display active selections that the user can dismiss individually.
- The interaction is user-initiated and the element must communicate a selected or unselected state.
Avoid Chips when:
- You’re showing read-only metadata or categorisation with no interaction — use a Tag instead.
- You’re communicating a system-assigned state such as availability or stock status — use a Tag status variant instead.
- The intent is to trigger an action rather than manage a selection — use a Button.
- The element is purely decorative and carries no interactive meaning.
Properties
Section titled “Properties”Size
Two sizes: Small (the default) and Large. Small suits dense filter rows and inline placement; large gives more tap area on touch surfaces. Both keep the same anatomy and only scale padding, icon, and text.
Icons
A chip can carry an optional leading icon (for example a check that reinforces the selected state) and an optional trailing icon (a close cross to dismiss, or a chevron when the chip opens a dropdown). Decorative icons stay hidden from assistive tech.
State
Chips move through Rested, Hover, Active, Selected, Disabled, and Focused. Selected pins the chosen appearance — a dark fill that reads as “on” — while active mirrors the pressed look, useful while a menu the chip controls is open.
Surface
Chips adapt to the surface they sit on. Use the default treatment on standard backgrounds, On image over photography, and On solid on dark or contrast backgrounds. Each keeps the label and icons legible against its backdrop.
Selection
Chips support single and multi selection. In a single-selection group only one chip can be on at a time; in a multi-selection group any number can be selected together — pair each with a trailing close so a selection can be cleared.
Platform considerations
Section titled “Platform considerations”Desktop
Chips sit inline in a filter bar or beneath a heading. Keep padding consistent across the group so the row reads as one rhythm, and lean on the default small size to fit more options in view.
Tablet
Same inline placement, with a little more breathing room. Consider the large size where chips are the primary touch target so they stay comfortable to tap.
Mobile
Wrap chips onto multiple rows rather than truncating labels, and keep the tap area generous. A horizontally scrolling row works for long filter sets, but make sure the first and last chips hint that more exist.
Best practices
Section titled “Best practices”Chips read as selectable — keep them for choices, and let their state do the talking so users can tell at a glance what’s on and what’s off.
Do
Use chips for filters and multi-select choices, keep labels short and scannable, show a clear selected state, and add a trailing close when a selection can be removed. Match the surface variant to the background so labels stay legible.
Don't
Don’t use chips to trigger actions (reach for a Button) or to show non-interactive metadata (use a Tag). Don’t mix single- and multi-selection behaviour in one group, and don’t overload a row with so many chips that the selection is hard to parse.
Content guidelines
Section titled “Content guidelines”Chip labels should be short — ideally one or two words — and name the option in plain language (“In stock”, “Petrol”, “Under €30k”). Use sentence case and skip trailing punctuation. Keep labels parallel across a group so the options scan as a set, and make sure each label reads clearly on its own, since a selected chip may be announced out of context.
Styles
Section titled “Styles”<button class="tng-chip"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Label</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button>The default size is sm.
<button class="tng-chip is-sm"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Small</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip is-lg"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Large</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button>States
Section titled “States”Use is-selected for a chip that’s currently chosen. The pressed appearance applies automatically while the chip is held (:active); add is-active to pin that appearance — for example, while a menu the chip controls is open. Disable a chip with the native disabled attribute.
<button class="tng-chip is-active"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Active</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip is-selected"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Selected</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip" disabled> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Disabled</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button>Variants
Section titled “Variants”On Image
Section titled “On Image”Use on-image when placing chips on top of imagery — for example, over a hero or product photo.
<button class="tng-chip on-image"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Label</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip on-image is-selected"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Selected</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip on-image" disabled> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Disabled</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button>On Solid
Section titled “On Solid”Use on-solid when placing chips on a dark or contrast background.
<button class="tng-chip on-solid"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Label</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip on-solid is-selected"> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Selected</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button><button class="tng-chip on-solid" disabled> <i class="tng-icon icon-check" aria-hidden="true"></i> <span>Disabled</span> <i class="tng-icon icon-close" aria-hidden="true"></i></button>Suggestion
Section titled “Suggestion”Use is-suggestion for a filter-style pill — a white rested fill, a trailing arrow, and a dark selected state. It’s the chip behind the suggestions in Chat messages. The label sits in a <span> and the arrow is a decorative trailing icon-ui-arrow-right.
<button class="tng-chip is-suggestion"> <span>Label</span> <i class="tng-icon icon-ui-arrow-right" aria-hidden="true"></i></button><button class="tng-chip is-suggestion is-selected"> <span>Selected</span> <i class="tng-icon icon-ui-arrow-right" aria-hidden="true"></i></button><button class="tng-chip is-suggestion" disabled> <span>Disabled</span> <i class="tng-icon icon-ui-arrow-right" aria-hidden="true"></i></button>When to use it (and when not to):
- Use when:
- To let users apply or remove filters within a search or listing experience
- To represent selectable options within a group where multiple choices are possible
- To display active selections that the user can individually dismiss
- When the interaction is user-initiated and the element needs to communicate a selected or unselected state
- Avoid when:
- To display read-only metadata or categorisation with no interaction, use a Label instead
- To communicate a system-assigned state such as availability or stock status, use a Label status variant instead
- As a replacement for a button when the intent is to trigger an action rather than manage a selection
- When the element is purely decorative and carries no interactive meaning
Component
Section titled “Component”Properties
Section titled “Properties”| Prop | Type | Description | Required |
|---|---|---|---|
label |
string |
Label for the chip | ✅ |
size |
Size |
Defines the size of the chip | |
className |
ClassValue |
Custom classNames you want to apply on the chip button | |
isSelected |
boolean |
Indicates if the chip is currently selected | |
leadingIcon |
ToyotaIcon | LexusIcon |
Icon displayed before the text | |
trailingIcon |
ToyotaIcon | LexusIcon |
Icon displayed after the text |
Example
Section titled “Example”import { Chip } from '@tmedxp/react-components';
const ChipExample = () => { return <Chip text="Label" />;};
export { ChipExample };A chip is a selectable option the user turns on and off, so it follows the WAI-ARIA Button pattern as a toggle button — and meets WCAG 2.1 AA. An accessible chip stays reachable and operable from the keyboard, exposes its on/off state to assistive technology, and takes its accessible name from its label — so the choice it holds is clear whether the user is looking at it, listening to it, or tabbing through it.
For designers
Section titled “For designers”- The label, icons, and every state must meet accessible contrast on each supported surface (default, on-image, on-solid). Source: WCAG 1.4.3 Contrast (Minimum).
- The selected state must never be conveyed by colour alone — reinforce the selected fill with the leading check icon or another non-colour cue. Source: WCAG 1.4.1 Use of Color.
- Focus styles must stay visible, meet contrast on every supported surface, and be clearly distinguishable from both hover and the selected state. Source: WCAG 2.4.7 Focus Visible.
- Use semantic colour tokens (e.g.
foreground/neutral/default) rather than fixed values, so chips adapt correctly across themes and surfaces.
For developers
Section titled “For developers”A chip is a native HTML <button> used as a toggle, following the WAI-ARIA Button pattern. Because it is a real button it is focusable and keyboard-operable with no extra wiring, and it carries a pressed state so assistive technology can announce whether the option is currently on. When several chips form a filter set, wrap them in a named group so their shared purpose is announced. The per-element roles, names, and states — including how the decorative icons stay out of the accessible name — are in the Labelling elements section below.
Keyboard interaction
Section titled “Keyboard interaction”| Key | Action |
|---|---|
| Enter / Space | Toggle the focused chip on or off |
| Tab / Shift + Tab | Move to the next / previous chip or control |
Chips must be at least 24 px on their smallest side so they clear the WCAG AA target-size minimum for comfortable touch use. Source: WCAG 2.5.8 Target Size (Minimum).
Labelling elements
Section titled “Labelling elements”Give every element the role, name, and state assistive technology needs.
Chip
A native <button> (implicit role="button") that takes its accessible name from its label text — keep that text self-describing, since a selected chip may be announced out of context. Reflect the selected state with aria-pressed (true when on, false when off) so it is announced, not shown by styling alone. The decorative leading and trailing icons carry aria-hidden="true" so the name stays just the label.
Filter group
Wrap a set of related chips in a role="group" element and name it with aria-label (or aria-labelledby), e.g. aria-label="Filter by fuel type", so assistive technology announces what the chips choose between.
Source: WCAG 4.1.2 Name, Role, Value.