Skip to content

Filters Panel

FiltersPanel is the content of the left panel on a list page. The Page shell owns the panel’s header, collapse and rail; this is what goes inside. A screen keeps its own filter state and rules and renders its filters through these rows.

Live demo

Filters

Status
2
1
Only jobs with

Behavior

  • Sections have an overline title, optional header actions, and a Clear button that calls the screen’s reset.
  • A switch row is a label, an optional dim count (how many records the switch leaves in), and a switch. The label is tied to the switch by id.
  • A check row is a checkbox, its label and a right-aligned count, for a pick-several list such as Status. A switch is one on/off setting; a run of check rows is a set of values to keep.
  • A select row is a label over a select; an option’s count is appended to its label, “Bea Hart (7)”.
  • A group label is a small dim caption above a run of rows, “Only jobs with”.

Usage

import {
FiltersPanel,
FiltersSection,
FilterSwitchRow,
FilterSelectRow,
} from "@beacon/design-system";
<FiltersPanel>
<FiltersSection title="Filters" onClear={clear}>
<FilterSwitchRow id="mine" label="Only my jobs" checked={mine} onCheckedChange={setMine} />
<FilterSelectRow id="pm" label="PM" value={pm} onValueChange={setPm} options={pms} />
</FiltersSection>
</FiltersPanel>

Props

ComponentProps
FiltersSectiontitle, children, onClear, clearLabel (default “Clear filters”), clearDisabled, actions.
FilterSwitchRowid, label, count, checked, onCheckedChange.
FilterCheckRowid, label, count, checked, onCheckedChange.
FilterSelectRowid, label, value, onValueChange, options (value, label, count).
FiltersGroupLabelchildren.