Chip
Frondaria-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-pressedmarks 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-pressedtells 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
| Prop | Values |
|---|---|
| variant | "outline""ghost" |
| disabled | boolean |
VariantsDefaultGhostWithIconSelectableDisabledMixed
Keep going
- ButtonEvery clickable. Variants: default, outline, ghost, ghostMuted, destructive, destructiveOutline, link.Frond
- SegmentedControl2–5 exclusive views. Tabs for page sections, SegmentedControl for a view toggle.Fiddle
- BadgeStatic labels and counts. Neutral by default; status hues only when the badge is the status.Frond
Patterns
How components come together into pages.