CategoryFilter

molecules

Horizontal scrollable row of category chips — Music, Sports, Comedy, Theater, Festivals, Family. Multi-select for filtering event grids.

ARIA Role: group

Demo

Demo for CategoryFilter (molecules)

Horizontal scrollable row of category chips — Music, Sports, Comedy, Theater, Festivals, Family. Multi-select for filtering event grids.

Props

PropTypeRequiredDefaultDescription
categoriesCategory[]Yes3-12 categories
selectedIdsstring[]Yes
onSelectionChange(ids: string[]) => voidYes

TypeScript Interface

interface CategoryFilterProps {
  categories: { id: string; label: string; icon?: React.ReactNode; count?: number }[];
  selectedIds: string[];
  onSelectionChange: (ids: string[]) => void;
  showCounts?: boolean;
}

Assertions (NASA Rule 5)

  • [type]categories bounded 3-12 (NASA Rule 2)(NASA Rule 2)
  • [aria]role='group' aria-label='Filter by category'(WCAG 1.3.1)

Usage

Import

import { Categoryfilter } from '@epasslive/design-system'

Basic

<Categoryfilter />

With Variants

<Categoryfilter variant="primary" size="md" />