Skip to content

Filter Panel

Beta
Get Ritla UI

A side panel of filters for a table or a list, with chips for the filters that are on.

Preview

Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.

PreviewCode
EnglishMirroredArabic
LTR →

Installation

  1. Add the component

    npx ritla add filter-panel

    Also works with shadcn: npx shadcn@latest add @ritla/filter-panel

  2. Dependencies it brings

    @phosphor-icons/react

  3. Or copy by hand

    Installing by hand copies the component's source into your project. The source comes with a Ritla UI license, so the CLI is the short way to the same files.

Usage

filter-panel.tsx
import { FilterPanel, FilterSection } from "@/components/ui/filter-panel";<FilterPanel title="Filters" footer={<Button type="submit">Show 24 results</Button>}>  <FilterSection legend="Status">…</FilterSection></FilterPanel>

API reference

FilterPanel

PropTypeDefaultDescription
titleReactNodeNoneThe panel title.
onClose / closeLabel() => void / stringNoneFigma's Show close: a named close button.
footerReactNodeNoneReset and Apply; Apply says how many results it will show.

FilterSection

PropTypeDefaultDescription
legendReactNodeNoneThe group's name; omit it when a CheckboxGroup or RadioGroup inside names itself.

AppliedFilters

PropTypeDefaultDescription
childrenReactNodeNoneAn InputChip per filter that is on.
onClearAll / clearLabel() => void / stringNoneThe Clear all button.

Accessibility

Keyboard

Keys are written for left-to-right. In right-to-left the arrow keys swap: the one pointing toward the reading direction moves forward.

KeyAction
TabMoves through the filters, then Reset and Apply.

ARIA

  • The panel is a form, and each group a named fieldset.
  • Applied filters are a named group; each chip has a remove button.

Arabic and RTL notes

Mirrors

  • Close ends the header, and the chips start from the right.

Does not mirror

  • Amount fields stay left to right.
Numerals
Result counts as the app passes them.
Arabic typography
Legends label-14 Semibold.