Skip to main content
FlowsFiltering & SortingAdding a filter similar to Airtable
shadcn/ui Flows

Adding a filtersimilar toAirtable

The filter pattern of spreadsheet-style databases, rebuilt on a 24-row projects table. A popover under the Filter button holds a list of conditions, each one a field, an operator that fits the field type and a value. The grid filters as you type, the button says what is filtering, and the filtered columns are tinted so the result explains itself.

Install flow

Step 1 of 5Projects grid

Every screen

The 5 steps in order. Pick one to open it in the preview above.

01Projects gridAll 24 projects in a grid view, with the view toolbar above.
02Open the filterThe empty filter panel: describe what you want to see, or add a condition.
03First conditionThe description became "Where Duration > 60" and the grid already shows only the long projects.
04Add a second conditionA second row joined with "and": Progress ≥ 50 narrows the list to the projects that are both long and well along.
05Filtered gridThe panel is closed: 8 projects, "Filtered by Duration, Progress" in the toolbar and both columns tinted.

Installation

Part of shadcn/ui Pro

Pro unlocks one-command install of every flow in Radix UI, Base UI and React Aria, plus all 507 blocks, the Figma kit, themes and the MCP server for your AI editor.

Part of shadcn/ui Pro

Pro unlocks one-command install of every flow in Radix UI, Base UI and React Aria, plus all 507 blocks, the Figma kit, themes and the MCP server for your AI editor.

Why this flow works

A condition builder for a data grid: describe the rows you want in plain words or add "Where field operator value" rows, joined by and/or, with the grid, counts and filtered columns updating live.

Conditions, not a fixed set of chips

Every field can be filtered, so the panel builds sentences instead of offering preset chips: "Where Duration > 60 and Progress ≥ 50". Use this when users filter on many columns; use chips when there are three or four common filters.

Operators follow the field type

Text gets contains and is, numbers get =, <, ≥, statuses and people get is and is not with a picker, dates get before and after, and every type has is empty. Changing the field resets the operator and value, so a row is never in an impossible state.

Live results, half-built rows ignored

The grid, the row count in the footer and the "8 of 24 projects" line in the panel update on every keystroke. A row without a value is shown but does not filter yet, so adding a condition never empties the grid by surprise.

The filter is always visible

Once a condition applies, the toolbar button reads "Filtered by Duration, Progress" on a tinted background and the filtered columns are tinted too. Nobody wonders why rows are missing after closing the panel.

Step by step

  1. 01

    Projects grid

    All 24 projects in a grid view, with the view toolbar above.

    The starting point: a populated table with status, owner, progress, duration and dates. The footer shows the row count and averages that the filter will change.

  2. 02

    Open the filter

    The empty filter panel: describe what you want to see, or add a condition.

    Two ways in. Plain words ("longer than 60 days") suit people who do not know the field names; Add condition suits people who do. The empty state says plainly that nothing filters yet.

  3. 03

    First condition

    The description became "Where Duration > 60" and the grid already shows only the long projects.

    The condition is editable like any other row, so a wrong guess from the description costs one click. The toolbar button switches to "Filtered by Duration" and the Duration column is tinted.

  4. 04

    Add a second condition

    A second row joined with "and": Progress ≥ 50 narrows the list to the projects that are both long and well along.

    New rows start as "Project name contains …" with an empty value, so they change nothing until finished. The joiner on the second row switches between and/or for the whole list.

  5. 05

    Filtered grid

    The panel is closed: 8 projects, "Filtered by Duration, Progress" in the toolbar and both columns tinted.

    Closing the panel keeps the filter. The button label, the tinted columns and the footer count say what is hidden and why; reopening the panel shows the same rows to edit or remove.

Built with shadcn/ui and Radix UI

  • Button
  • Popover
  • Select
  • Input
  • Input Group
  • Field
  • Avatar

This is an original rebuild of the flow's structure, with its own brand, copy and artwork. Airtable is a trademark of its owner; this page is not affiliated with or endorsed by Airtable.

Frequently asked questions

Installing, adapting and theming this flow for Radix UI.