Filter MenuPro
Grouped filters with removable chips, collapsible checkbox groups, Clear all and full keyboard control.
oxyn add filter-menuThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- Narrow a run list, an inbox of approvals or a trace by status, agent and repository.
- The user wants to see at a glance which filters are on and remove one without reopening anything.
When not to use
- Actions and choices behind any trigger: use Dropdown Menu instead.
- A small status label that carries the colour: use Badge instead.
- On or off for things that apply right away: use Switch instead.
Installation
Filter Menu is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add filter-menuUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
Two filters on, first group open.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Counts
Result counts per option (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Logic
Any / All per group with a summary (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Views
Saved views (Oxyn plus).
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
FilterMenu
| Prop | Type | Default | Description |
|---|---|---|---|
groupsrequired | Vec<FilterGroup> | — | Groups. |
value | Vec<(String, String)> | Default::default() | Starting filters: `(group id, option id)`. |
default_open | Option<Vec<String>> | Default::default() | Groups that start open (default: the first). |
title | String | "Filters" | Heading. |
hints | bool | true | Keyboard hints on the tray. |
logic | bool | Default::default() | Oxyn plus: Any / All per group. |
presets | bool | Default::default() | Oxyn plus: saved views. |
summary | bool | Default::default() | Oxyn plus: a one-line summary under the chips. |
on_change | EventHandler<Vec<(String, String)>> | — | Changed: every active `(group, option)`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| ↑or↓ | Move through group headers and the options of open groups |
| EnterorSpace | Pick or unpick an option, or open and close a group |
| →or← | Open a group, or close it and jump back to its header |
| HomeorEnd | First / last row |
Accessibility
- Group headers carry aria-expanded; options are role=checkbox with aria-checked.
- One tab stop for the list (aria-activedescendant), so Tab moves past it in one step.
- Each chip has a remove button named for the filter; changes are announced.
From the spec
One tab stop for the list (role=tree with aria-activedescendant), so Tab leaves in one step. Headers expose aria-expanded; options are checkboxes. Every chip has a remove button named "Remove Status: Open". Changes are announced: "Added Coder filter, 2 active".
Motion & interaction
Groups open and close with their options sliding in; the chevron turns 90°. Chips pop in and the chip row's height animates. The active-count pill rolls. Checkboxes fill and draw their tick.
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Option rows in | 160 ms | ease.out | 1 ms |
| Chevron | 214 ms | ease.out | instant |
| Chip in | 180 ms | ease.out | 1 ms |
| Count roll | 180 ms | ease.out | swap |
| Check | 220 ms + 240 ms draw | ease.out | drawn |
Responsive behaviour
- Fills its container up to 420 px; chips wrap.
Edge cases (spec)
Many options: the list scrolls inside its container. Long labels wrap in rows and truncate in chips. Removing the last filter hides Clear all. Up to 420 px wide; chips wrap at narrow widths. RTL: chevrons and indentation mirror.
Notes for AI
- Import
FilterMenufromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
FilterMenuElinoxyn_gpui. - Props to set first:
groups. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.