FilterChip
A single toggle chip for a filter, on its own rather than in a chip group.
Import
import { FilterChip } from '@tallyui/components';Usage
<FilterChip label="Equipment" active={isActive} onPress={toggle} />The chip renders as a toggle group with one item, whose value is on while active is true. Pressing it calls onPress; the caller flips active. For a scrollable row of chips, use FilterChipGroup.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | required | Chip label text |
active | boolean | required | Whether the chip is selected |
onPress | () => void | required | Called on press |
className | string | — | Extra classes for the chip |
Active classes: bg-primary with text-primary-foreground
Inactive classes: bg-accent with text-muted-foreground