Filter Bar

A row of toggle-able filter chips for category-based filtering, with active state highlighting in Zostel orange.

Preview

Usage

tsx
import { FilterBar } from "zostel-ui";

const [active, setActive] = useState(["All"]);

<FilterBar
  filters={["All", "Workation", "Adventure", "Weekend", "Mountain", "Beach"]}
  active={active}
  onChange={setActive}
  variant="chip"
/>

Props

filters
Type: string[] | FilterItem[]
Default:

Array of filter labels or objects with label, icon, and count

active
Type: string[]
Default:

Currently active filter values

onChange
Type: (active: string[]) => void
Default:

Callback when selection changes

variant
Type: "chip" | "icon" | "count"
Default: "chip"

Visual variant for the filter chips

multiSelect
Type: boolean
Default: true

Whether multiple filters can be active