Filters Panel

A card with the filter fields above a table or a list. Users pick which filters are shown and drag them into their own order; the choice is saved per panel. Below 1024px the fields fold into a "Filters" button with the number of active filters.

A block from @tectra-ng/blocks — it comes with tectra-ng, or alone: npm install @tectra-ng/blocks.

Features7APIThemingAccessibility

Basic

Wrap every field in an element with txFilterField and a filterLabel. The fields share a grid that wraps on its own; the reset button marked txFiltersActions sits at the end.

5 of 5 orders

Customizable

With a stateKey the panel gets the "Show filters" menu: tick the fields to show and drag them by the handle (or Alt + arrows) into your order. The layout is saved under that key and comes back after a reload. A field with a value (filterActive) is always shown; defaultVisible sets how many fields are shown at first.

Saved: default

Actions

Put any buttons into the end of the panel with txFiltersActions. Below 1024px a panel with two or more fields folds into a "Filters" button with the number of active filters; the fields open in a panel under it. The action marked txFiltersReset leaves the bar there and a "Clear filters" button in the panel runs it. Make the window narrower to try it.

Drafts created: 0 · panel closed

Mobile

On a phone the fields fold behind a "Filters" button that counts the active filters; they open in a panel under the bar, scroll inside it and close on a click outside or Escape. The reset action moves into the panel as "Clear filters". collapse="always" shows this look at any width (here in a phone-wide frame); never keeps the fields open.

Plain

variant="plain" drops the frame, for filters inside another card, a drawer or a dialog.

Team members
People with access to the workspace

Busy

busy turns every field into a skeleton of its label and control while the list loads — same size, the values stay. Pass the loading state of the list; here Reload starts a short load.

Design tokens

dt changes the tokens of one panel: here a softer frame and tighter spacing. The tokens of the "Show filters" menu reach it too.