Skip to content
Data & ChartsPro

Filter Menu

A filter button that opens a checklist of options with counts, an all-row and Clear filter — for table and list filters.

See alsoData TableProDropdown MenuPro

Usage

Installation

Filter Menu comes with WunderUI Core and Pro, in the package from your plan. See the plans.

Then import what you need:

tsx
import { FilterMenu, FilterMenuOption, FilterMenuProps } from "@wunderui/react"

Examples

Sizes

sm, md and lg follow the button scale, so the trigger lines up with the controls next to it.

In context

How the component is used inside real screens — the same compositions as the Usage section of the Figma page.

Filtering a table

Every option checked means no filter; unchecking narrows the rows, and an empty result says so.

Invoices5 of 5
InvoiceCustomerStatus
INV-2041Alina Lorenzpaid
INV-2042Felix Brandtpending
INV-2043Halcyon Labsoverdue
INV-2044Pergola Foodspaid
INV-2045WunderUIdraft

Anatomy

The parts the component is made of. Each one renders a you can target from CSS.

  • data-slot="filter-menu"

    A multi-select filter: a trigger button and a menu of checkbox rows. lists the checked options, and every option checked means no filter.

  • data-slot="filter-menu-trigger"

    The plain button with the sliders icon. It shows the count () and takes the link colour while the list is filtered.

  • data-slot="filter-menu-all"

    The first row. It checks or clears every option and shows checked, mixed or empty, depending on how many options are on.

  • data-slot="filter-menu-item"Optional

    One option with a checkbox and an optional on the right. Ticking it keeps the menu open.

  • data-slot="filter-menu-box"Optional

    The visual checkbox at the start of a row. It is decorative; the row itself carries the checked state.

  • data-slot="filter-menu-clear"

    Resets to every option checked and then calls . It is disabled while no filter is active.

Best practices

  • When to use

    Use a FilterMenu to narrow a list or table by one attribute with several values, such as status or owner. For choosing a single value, use a select.

  • Do

    Start with every option in . Checked means shown, so the full list is the unfiltered state and the trigger stays in its plain look.

  • Do

    Pass for each option when you have it. People see how many rows a choice leaves before they tick it.

  • Do

    Use to reset the dependent state, such as the page number. selects all options itself and then calls it.

  • Don’t

    Don't hold an empty as the idle state. Nothing checked reads as a filter that shows nothing, and the trigger turns active.

  • Don’t

    Don't change the per selection. The trigger adds the count itself, and its accessible name reads .

API Reference

PropTypeDefault
onValueChange*(value: string[]) => void—
options*FilterMenuOption[]—
value*string[]—
align"start" | "center" | "end""end"
allLabelstring"All"
classNamestring—
iconReact.ReactNode—
labelstring"Filters"
onClear() => void—
size"sm" | "md" | "lg""md"

Theming

The CSS variables this component reads. Set one on any wrapper to restyle everything inside it. More in Theming.

VariableUsed forDefault
Color
Backgroundfocus#F1F5F7dark #323438
Textfocus#000000dark #FFFFFF
Border#D9E1E7dark #323438
Background#FFFFFFdark #1C1D20
Background, border#555CF3
Text#FFFFFF
Text#555CF3dark #999DF8
Textdisabled#6E6E70dark #A2A3A3
Backgroundselected#F4F5FFdark #222561
Radius
Corner radius8px
Corner radius4px
Density
Padding0.375remcomfortable 0.5rem
Motion
Duration150ms
Easingcubic-bezier(0.22, 1, 0.36, 1)