Content
- First option: "All {things}".
A table column header that filters its own rows.
import { … } from "@brdgapp/ui/components/column-filter-menu"ColumnFilterMenu is a table column header that filters its own rows: the column's icon and name with a chevron, opening the same single-choice menu as FilterPill. When a filter is on, the label turns blue and a dot appears, so it's visible without opening the menu.
Header. Icon, 12px Bold label, a blue dot when filtered, a chevron.
Menu. 220px wide, aligned to the header's left edge, scrolls past 320px. Same rows as FilterPill.
Filters the sample intros.
8 of 8 intros
| Rest | Hover | Focus | |
|---|---|---|---|
| All | |||
| Filtered |
| State | What happens |
|---|---|
| All | Secondary label. |
| Filtered | Blue label and icon, a blue dot. |
| Open | Chevron flips; the column's tooltip is hidden so it doesn't cover the menu. |
Do
Show the filtered count near the table ("3 of 8 intros").Don't
Filter silently, so rows just vanish.| Keys | Action |
|---|---|
| EnterSpace↓ | Open. |
| ↑↓Enter | Choose. |
| Esc | Close. |
ColumnFilterMenu
The filtering header.
| Prop | Type | Default | Description |
|---|---|---|---|
icon | LucideIcon | — | The column's icon component. |
label | string | — | The column name. |
tooltip | string | — | Explains the column. |
value | string | — | The chosen option. |
options | { value, label }[] | — | The first is "All". |
onChange | (value) => void | — | Called with the new choice. |
…other attributes | id, aria-*, data-*, event handlers | — | Passed to the button. The component's own props win where they overlap. |
What it's built from and where it's used, read from the code. When you change it, check these too.
components.md → ColumnFilterMenu; src/components/ui/column-filter-menu.tsx.