Chip
When to use it
Section titled “When to use it”- To filter a list of results, such as search filters (“Pool”, “Pet friendly”, “Free cancellation”).
- To switch between categories of the same content, such as “All”, “Bedrooms” or “Kitchen” in a photo gallery.
- Use the selected state (blue) for filters the user has turned on, and selected-strong (navy) for the active category in a category row.
- To show how many items an option holds, as part of the label (for example, “Kitchen 6”).
When not to use it
Section titled “When not to use it”- To show a status such as “Confirmed” or “Pending”: use a Badge component instead.
Instead: Badge - To trigger an action, such as booking or submitting: use the Button component instead.
Instead: Button - For a yes or no choice inside a form: use the Checkbox component instead.
Instead: Checkbox - To go to another page: use the Link component instead.
Instead: Link
Best practice
Section titled “Best practice”From the Figma documentation page (usage node 122:336), as written. These items aren’t carried into Chip.intent.json, which has no field for them.
- Keep labels short: one to three words, plus an optional count.
- A chip that’s on must use a selected state, so the current selection is always visible.
- Don’t mix selected and selected-strong chips in the same row.
- Space chips 8px apart in one row; let the row scroll or wrap on small screens rather than shrinking the chips.
- When several filters can be on at once, give the user a way to clear them all.
- Mark the selected chip for assistive technology (aria-pressed or aria-selected), not with colour alone.
What each variant is for
Section titled “What each variant is for”| Property | Value | What it is for |
|---|---|---|
state |
unselected |
default |
state |
selected |
blue, a filter that’s on |
state |
selected-strong |
navy, the active category in a category row |
Accessibility
Section titled “Accessibility”- The control is a native <button type=“button”>, so keyboard activation, focus ring and disabled behaviour are the browser’s own.
src/components/Chip/Chip.tsx:19 - The selected state is exposed to assistive technology through aria-pressed (true for selected and selected-strong, false for unselected), and a caller-supplied aria-pressed overrides it because the passthrough props are spread after it.
src/components/Chip/Chip.tsx:21 - The label is the button’s text content, which gives it its accessible name.
src/components/Chip/Chip.tsx:25
What this version promises
Section titled “What this version promises”From Versioning (VERSIONING.md at b9ffb76):
0.3.0 adds six components on top of 0.2.1: Calendar, Card, Form, Modal, SideBar and Table. It contains twenty-three components, each exported from the package root with its props type: Avatar, Breadcrumbs, Button, ButtonGroup, Calendar, Card, Checkbox, Chip, Dropdown, File, Form, Header, Image, Link, Logo, Modal, ProgressBar, RadioCard, SearchBar, SideBar, Stepper, Table, Toggle. Textfield is exported from the package root as well, with TextfieldProps and TextfieldState, and is public like the others (see decisions.md, 2026-10-07, Textfield). It commits you to their props, prop values and defaults, their hz- class names, the tokens in tokens.css and the three entry points (., ./styles.css, ./tokens.css). Everything in 0.3.0 beyond 0.2.1 is an addition: nothing from 0.2.1 was changed, removed or renamed. A change that breaks any of these on 0.x bumps the version to 0.4.0.
Two things about this release are worth knowing:
- Form, Modal and Table each passed release review with their literal sizes covered by a ruling in decisions.md (Card, SideBar and Calendar have their own), because no size tokens exist for them. Those literals are accepted until the designer adds matching tokens, so a later change to use tokens at the same rendered sizes would be a patch, not a breaking change.
- Dark theme is not verified for Table, and its warning tag has low contrast. The Table docs page says so. Neither is a breaking-change risk, but a fix that changes a token’s value is a patch and is listed in the changelog.
Stories
Section titled “Stories”All States
Section titled “All States”The single-variant stories (Unselected, Selected, SelectedStrong) are rows of the variant matrix; the Design tab links each one.
Import
Section titled “Import”import { Chip } from "@layerbasesystemic/horizon-design-system";import type { ChipProps, ChipState } from "@layerbasesystemic/horizon-design-system";@layerbasesystemic/horizon-design-system/tokens.css and @layerbasesystemic/horizon-design-system/styles.css must be loaded too; see Developing.
| Prop | Type | Default | Description |
|---|---|---|---|
state |
ChipState |
"unselected" |
— |
label |
string |
"Label" |
— |
ChipProps also extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "type" \| "children">, so native attributes pass through to the element (Chip.tsx:6).
Union types
Section titled “Union types”ChipState: unselected, selected, selected-strong
Tokens it needs
Section titled “Tokens it needs”Every CSS custom property Chip.css reads, with its value in the token build at b9ffb76.
| Token | Light | Dark |
|---|---|---|
--border-width-sm |
1px |
same as light |
--color-bg-elevated |
#f9fafb |
#4d5361 |
--color-bg-inverse |
#161925 |
#f9fafb |
--color-border-default |
#d7dee7 |
#4d5361 |
--color-primary-default |
#2b5ad6 |
#6692f8 |
--color-text-inverse |
#f9fafb |
#161925 |
--color-text-secondary |
#4d5361 |
#9ca2b1 |
--fontfamily-body |
Inter |
same as light |
--fontsize-md |
12px |
same as light |
--lineheight-md |
18px |
same as light |
--radius-full |
999px |
same as light |
--spacing-lg |
16px |
same as light |
This matches required_tokens in Chip.intent.json exactly.
Figma node
Section titled “Figma node”Page Chip (57:1633), documentation frame ❖ chip (122:2), component set chip (121:15). The file is shared with the team only, so the frame and the link ask anyone outside it to sign in.
Variant matrix
Section titled “Variant matrix”state (3) = 3 cells. The documentation frame (122:2) lays the three states out in one column, each beside a text label (unselected, selected, selected-strong). The component set (121:15) publishes three variants, state=unselected (121:8), state=selected (121:11) and state=selected-strong (121:13). Label (text, default “Label”) is a component property, not a matrix axis. Every variant is 64x32 with the default label.
state |
Figma node | Story |
|---|---|---|
unselected |
121:8 |
Unselected |
selected |
121:11 |
Selected |
selected-strong |
121:13 |
Selected Strong |
Themes
Section titled “Themes”The Chip frame renders every state once, in one theme. It has no separate light and dark frames.
The token build defines 179 tokens for light and redeclares 50 for dark; the Code tab shows Chip’s tokens in both.
Values Figma never bound
Section titled “Values Figma never bound”Values on the Figma node that aren’t bound to a variable, and what Chip.css at b9ffb76 does with each.
| Layer | Property | Figma value | In the code |
|---|---|---|---|
| chip, every state (121:8, 121:11, 121:13) | height | 32px |
height: 32px; |
Figma variables against the token build
Section titled “Figma variables against the token build”| Figma variable | Figma value | Token in the build | Built light value | Agrees |
|---|---|---|---|---|
--color-text-secondary |
#4d5361 |
--color-text-secondary |
#4d5361 |
yes |
--fontSize-md |
12 |
--fontsize-md |
12px |
yes |
--fontWeight-medium |
Medium |
no such token | — | no token |
--fontFamily-body |
Inter |
--fontfamily-body |
Inter |
yes |
--lineHeight-md |
18 |
--lineheight-md |
18px |
yes |
--spacing-lg |
16 |
--spacing-lg |
16px |
yes |
--radius-full |
999 |
--radius-full |
999px |
yes |
--border-width-sm |
1 |
--border-width-sm |
1px |
yes |
--color-bg-elevated |
#f9fafb |
--color-bg-elevated |
#f9fafb |
yes |
--color-border-default |
#d7dee7 |
--color-border-default |
#d7dee7 |
yes |
--color-text-inverse |
#f9fafb |
--color-text-inverse |
#f9fafb |
yes |
--color-primary-default |
#3b71f2 |
--color-primary-default |
#2b5ad6 |
no |
--color-bg-inverse |
#161925 |
--color-bg-inverse |
#161925 |
yes |
--fontWeight-medium is bound in Figma but the token build has no token of that name.
1 colour variable in Figma still holds a different value from the token build, so the design file and the shipped component render --color-primary-default differently.
Design gaps recorded against it
Section titled “Design gaps recorded against it”- 2026-10-01 · Chip height with no token (decisions.md). This literal in src/components/Chip/Chip.css is accepted, because it is what the Figma node specifies, until the designer adds a matching size token. Accepted values:
32px(height (with box-sizing: border-box),.hz-chip, line 6). Not ruled: Any other literal value, including a var() fallback and any 7px padding. This value in any other component. A change to this value: a different number needs a new ruling or a token. The selected fill, which uses –color-primary-default (#2b5ad6) and differs from the #3b71f2 Figma shows: that is the user’s choice to use the bound token, not a gate finding. Any state Figma does not draw (hover, focus, disabled, pressed).