Tally UI

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

PropTypeDefaultDescription
labelstringrequiredChip label text
activebooleanrequiredWhether the chip is selected
onPress() => voidrequiredCalled on press
classNamestring—Extra classes for the chip

Active classes: bg-primary with text-primary-foreground Inactive classes: bg-accent with text-muted-foreground

On this page