Chip

Frond
Pill-shaped buttons: prompt suggestions and filter pills. aria-pressed marks the selected one.

Usage

The import, then a use to start from. Both copy as they are.

Import
import { Chip } from "@/components/ui/chip";
Example
<div className="flex flex-wrap gap-2">    {filters.map((filter) => (        <Chip key={filter.id} aria-pressed={active === filter.id} onClick={() => setActive(filter.id)}>            {filter.label}        </Chip>    ))}</div>

When to use

Use it for

  • A row of prompt suggestions or filter pills. aria-pressed marks the selected one.
  • variant="ghost" for a quieter pill beside outline ones, such as "Clear".
  • Short labels in sentence case: one or a few words.

Avoid

  • A primary or secondary action: use Button.
  • Picking one of a few views: use SegmentedControl.
  • A label that isn't clickable: use Badge.

Accessibility

Checks

  • Each chip is a button, so Tab reaches it and Enter or Space presses it.
  • aria-pressed tells assistive tech which filter is on.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

Chip

PropValues
variant"outline""ghost"
disabledboolean
VariantsDefaultGhostWithIconSelectableDisabledMixed

Keep going

Patterns
How components come together into pages.