Filter menu preview

Filter menu

Grouped filters with removable chips, collapsible checkbox groups, Clear all and full keyboard control

  • Group
    Selects
  • Origin
    Copied · affectUI · source
  • License
    MIT
  • Added
    Oct 18
npx shadcn@latest add @deank/filter-menu

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { FilterMenu } from "@/registry/components/filter-menu/filter-menu";

<FilterMenu groups={[/* … */]} />

Props

NameTypeDefaultDescription
groupsFilterGroup[]Required. Each { id, label, options: { id, label }[], chipPrefix? }
valueRecord<string, string[]>Picked option ids per group – makes it controlled
defaultValueRecord<string, string[]>{}Starting filters when uncontrolled
onChange(value) => voidCalled with the new filters after every change
defaultOpenstring[]the first groupGroups that start open
titlestring"Filters"Heading on top
hintsbooleantrueShows the keyboard hints on the tray
classNamestringExtra class on the root

When to use

- Filtering a list, table or board by a few groups of options – stage, owner, region and the like - Side panels or popovers where people pick several filters and want to see them all at a glance

When not to use

One single choice (segmented-control) or a short action list (goo-dropdown / profile-menu).

Related

Data grid · Segmented control · Goo dropdown