Inputs and selection
Filter chip
filter chips · selected is the theme's Chip colour (inverted by default)
function FilterChipDemo() { const [sel, setSel] = React.useState<string[]>(['all']); const toggle = (v: string) => setSel((s) => (s.includes(v) ? s.filter((x) => x !== v) : [...s, v])); return ( <View className="-mx-5 self-stretch"> <FilterChipRow> {['all', 'favourites', 'recent', 'archived', 'shared'].map((v) => ( <FilterChip key={v} label={v[0].toUpperCase() + v.slice(1)} selected={sel.includes(v)} onPress={() => toggle(v)} icon={v === 'favourites' ? StarIcon : undefined} /> ))} <FilterChip label="Disabled" disabled /> </FilterChipRow> <FilterChipRow className="mt-3"> <FilterChip size="sm" label="Small" /> <FilterChip label="Medium" /> <FilterChip size="lg" label="Large" /> </FilterChipRow> </View> );}Usage
Selected is the theme's Chip selected colour: inverted neutral by default.
API
<FilterChipRow><FilterChip label selected onPress icon? size?="sm|md|lg" /></FilterChipRow>Get it
Already in every copy of the native kit:
import { FilterChip, FilterChipRow } from '@/components/kit/filter-chip';Details
- Exports
FilterChip,FilterChipRow- Packages
- lucide-react-native@^1.21.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-component-classes, @halftone-native/lib-haptics, @halftone-native/lib-palette-context, @halftone-native/lib-theme, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- chip, tag filter, pill
- Registry JSON
- /r/native/filter-chip.json
function FilterChipDemo() { const [on, setOn] = React.useState<string[]>(['Paid']); const toggle = (l: string) => setOn((xs) => (xs.includes(l) ? xs.filter((x) => x !== l) : [...xs, l])); return ( <div className="flex max-w-full flex-col gap-3"> <FilterChipRow className="max-w-full"> {['Paid', 'Overdue', 'Draft', 'This month', 'Over £1,000'].map((l) => ( <FilterChip key={l} label={l} selected={on.includes(l)} onClick={() => toggle(l)} /> ))} </FilterChipRow> <FilterChipRow className="max-w-full items-center"> <FilterChip size="sm" label="Small" /> <FilterChip label="Medium" /> <FilterChip size="lg" label="Large" /> </FilterChipRow> </div> );}Usage
Selected is the theme's Chip selected colour: inverted neutral by default. For one choice among a few, use SegmentedControl.
API
<FilterChipRow><FilterChip label selected onClick icon? size?="sm|md|lg" /></FilterChipRow>Get it
Already in every copy of the web kit:
import { FilterChip, FilterChipRow } from '@/components/kit/filter-chip';Details
- Exports
FilterChip,FilterChipRow- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Also searched as
- chips, tags, filters
- Registry JSON
- /r/web/filter-chip.json
Agents: the whole registry is at /llms.txt.