Skip to content
Storybook

Chip

Interactive filter or choice chip. Selected shows a check and brand tint.

Preview

React · live from the Storybook

HTML and CSS

The same component as plain HTML with pixels-ui.css, no framework needed.

Usage

  • Use for quick filters above lists and tables.

Installation

Included in the core files. No extra install.

HTML
<link rel="stylesheet" href="/css/pixels-tokens.css">
<link rel="stylesheet" href="/css/pixels-ui.css">
<script src="/js/pixels-ui.js" defer></script>

Examples

Small and disabled

API reference

Class / attributeTypeDescription
px-chipclassButton with aria-pressed.
px-chip--smclassSmall.
px-chip__checkclassCheck icon shown when pressed.
data-px-toggleattributeToggles aria-pressed on click.

Figma properties

Chip20 variants · page “Tags”Open

Interactive filter or choice chip. Selected shows a check and brand tint. Use for quick filters above lists and tables (aria-pressed), or with a trailing chevron to open a filter menu.

PropertyTypeValues
LabelText“Filter”
Leading iconBoolean—
Leading icon swapInstance swap—
Trailing chevronBoolean—
SizeVariantSmall Medium
SelectedVariantFalse True
StateVariantActive Hover Pressed Focused Disabled

Design tokens

Component tokens from the Figma Component collection. Override them to restyle just this component.

TokenAliasLight value
--px-chip-contentcolor-content-neutral-primary#101828
--px-chip-selected-contentcolor-content-brand-default#2563eb
--px-chip-height-smspacing-2424px
--px-chip-height-mdspacing-2828px
--px-chip-radiusradius-88px
--px-chip-padding-xspacing-1212px
--px-chip-gapspacing-88px

Accessibility

  • aria-pressed tells screen readers the filter is on.