rslabdocs

Filter Chips

A multi-select row of tappable chips built on top of Tag, with a selection haptic per toggle.

ReanimatedHapticsNativeWindSource

Prerequisites

Filter Chips renders each chip through Tag, so it needs the same icon set as that component, plus haptics.


npx expo install @hugeicons/react-native expo-haptics

Install


npx @rslab/cli add filter-chips

Usage

import { FilterChips } from '@/components/ui/FilterChips';

const [filters, setFilters] = useState<string[]>(['remote']);

<FilterChips
  options={[
    { label: 'Remote', value: 'remote', emoji: '🌍' },

    { label: 'Full-time', value: 'full-time', emoji: '💼' },

    { label: 'Senior', value: 'senior', emoji: '⭐' },
  ]}

  value={filters}

  onChange={setFilters}
/>;

Any number of chips can be selected at once. Swap the accent color or disable the whole row while a filtered list is refetching:

<FilterChips
  options={roleOptions}

  value={roles}

  onChange={setRoles}

  activeColor="purple"

  disabled={isFetching}
/>

Props

PropTypeDefault
options
{ label: string; value: string; emoji?: string; icon?: HugeIcon }[]
-

One entry per chip.

value
string[]
-

Controlled array of currently-selected values.

onChange
(value: string[]) => void
-
activeColor?
'neutral''blue''green''red''yellow''purple'
'blue'

Tag's color for a selected chip. Applies to every chip in the row, not per-option.

disabled?
boolean
false

Fades every chip and blocks all taps.

haptic?
boolean
true

Mutes the selection tick when false.

className?
string
-

Extend or override the wrapping row.

See exactly how this works with an RSLAB subscription.

Get Pro

On this page