Filters

Narrow a list without leaving it: FilterBar’s five layout parts plus the menu’s dropdown, dialog, and count badge. Row inputs and all state are yours.

Demo

hero
Rows in the menu
appliedCount
surface
placement
import { Calendar, SearchLg } from "@untitledui/icons"; import { Button } from "@/components/base/buttons/button"; import { FilterBar } from "@/components/application/filter-bar/filter-bar"; import { FilterDropdown } from "@/components/application/filter-bar/filter-dropdown-menu"; <FilterBar.Root> <FilterBar.Content> <Button size="sm" color="secondary" iconLeading={Calendar}> Last 30 days </Button> </FilterBar.Content> <FilterBar.Actions> <FilterBar.FilterIconButton icon={SearchLg} label="Search orders" /> <FilterDropdown filters={filters} appliedCount={3} onApply={(next) => setApplied(next.length)} onAddFilter={addRow} onRemoveFilter={removeRow} onFilterChange={patchRow} onClearAll={clearAll} renderFilterRow={(filter, onChange) => ( <FieldOperatorValueInputs filter={filter} onChange={onChange} /> )} /> </FilterBar.Actions> </FilterBar.Root>

In context

in-context

Family

family
FilterBar.Root
FilterBar.Content
FilterBar.Actions
FilterBar.FilterRow
FilterBar.FilterIconButton
FilterDropdown
FilterDialog
3 applied
CountBadge

Types

cells

All eight bars the sheet draws, in canvas order.

The bar

Simple
Tabs and search
Tabs and date picker
Date filters
Status
Category
Dropdowns
Sort by
Dropdowns and date picker
Advanced inactive filter
Value
Advanced active filters

The trigger

the default, nothing applied
appliedCount 2: the tint and the badge
children: a More filters trigger
children: the icon-only trigger

The icon button

icon SearchLg, label Search orders
icon Calendar, label Pick a date range

Layouts

cells

The menu

open, empty: no footer
open, one draft row
open, three rows, the team value a multi-select

The slideout

surface slideout, three rows
surface slideout, empty: the footer stays

The row

Value
bar row: the inputs hug at fixed widths
menu row: the inputs group flexes

Content

cells

The count badge

1 applied
count 1
3 applied
count 3
12 applied
count 12: the box grows with the digits

Behaviour

cells
below md: the trigger opens the slideout
below md, Advanced: one Edit filters trigger
eight rows: the dialog grows, nothing scrolls

States

cells
isDisabled on the trigger
isDisabled on the icon button
hover and focus, live