Choice Chip

Compact selectable chip for filters. Host owns grouping and multi-select.

Also known as: filter chip, choice chips, selectable chip, filter pill

Installation

Install with the CLI, or copy the component source into your project.

Add choice-chip (npm)

npx --yes -p @default-file/ui df-ui add choice-chip

Default

Selectable chips for compact filters.

Sizes

Small, medium, and large.

Properties

Compact selectable chip for filters and quick choices. Label ink is optically centered to cap height with text-box when available, and a 1cap line box otherwise.

ChoiceChip

PropTypeDefaultNotes
selectedboolean-Selected (pressed) appearance.
size"sm" | "md" | "lg""md"T-shirt height and type size.
disabledboolean-Non-interactive chip.
childrenReactNode-Chip label.
classNamestring-Additional styles.

Tokens

Theme defaults live on :root. Override these globally or on a local host.

TokenTypeDefaultNotes
--primaryCSS colorvar(--df-neutral-850, var(--df-neutral-900))Selected fill.
--borderCSS colorvar(--df-neutral-100)Unselected border.
--mutedCSS colorvar(--df-neutral-50)Hover fill.
--backgroundCSS colorvar(--df-neutral-0)Unselected fill.
--spacing-unitCSS length0.25remBase unit for padding and gap.
--df-label-line-heightCSS line-heightvar(--df-leading-none)Line box for label flex centering. Defaults to --df-leading-none. When text-box is unavailable and the cap unit is supported, the kit sets this to 1cap so flex centering matches cap-height ink.