Skip to content

[menu] Add filterable menus - #5527

Merged
atomiks merged 198 commits into
mui:masterfrom
atomiks:codex/filter-menu-v1
Oct 1, 2026
Merged

atomiks merged 198 commits into
mui:masterfrom
atomiks:codex/filter-menu-v1

Conversation

@atomiks

@atomiks atomiks commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Closes #4157

This PR adds filterable menus: wrap Menu.Root or Menu.SubmenuRoot in Menu.FilterProvider, and add Menu.Input, Menu.List, Menu.Clear, and Menu.Empty to the popup. It also adds Menu.Root.onItemHighlighted. The filtering engine is only bundled with Menu.FilterProvider; plain menus grow by about 1.9 KB gzipped for the shared scaffolding.

Changes for existing menus:

  • Menu.List also works in plain menus. It takes the menu role, and the popup becomes presentation.
  • An arrow key pressed from non-item content inside a popup now enters the list at its start or end instead of continuing from the last highlight. This also applies to Select.
  • A screen reader press on a trigger opens the popup synchronously.
  • A Menu.Popup with its own aria-label no longer also gets aria-labelledby pointing at the trigger.
  • Generated popup ids use the base-ui- prefix.

Docs preview · Submenu example

@atomiks atomiks added component: menu Changes related to the menu component. type: new feature Expand the scope of the product to solve a new problem. v1.x labels Aug 18, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

commit: 11f3641

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+25.9KB(+5.26%) 🔺+8.05KB(+5.05%)

Details of bundle changes

Performance

Total duration: 450.87 ms -32.39 ms(-6.7%) | Renders: 76 (+0) | Paint: 826.65 ms -51.05 ms(-5.8%)

Test Duration Renders
Slider mount (300 instances) 48.06 ms ▼-15.37 ms(-24.2%) 2 (+0)
Dialog mount (300 instances) 11.45 ms ▼-4.59 ms(-28.6%) 1 (+0)

13 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Aug 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 11f3641
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6abe2248acf02a0008cc48f1
😎 Deploy Preview https://deploy-preview-5527--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks atomiks removed the v1.x label Aug 18, 2026
@atomiks
atomiks force-pushed the codex/filter-menu-v1 branch 2 times, most recently from 07935fd to aa4bd6d Compare August 24, 2026 05:50
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 24, 2026
@atomiks
atomiks force-pushed the codex/filter-menu-v1 branch from 18eea90 to 7dd289d Compare August 25, 2026 04:01
@github-actions github-actions Bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Aug 25, 2026
@atomiks
atomiks marked this pull request as ready for review August 25, 2026 08:19
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Aug 28, 2026
@jjenzz
jjenzz force-pushed the codex/filter-menu-v1 branch from 3e9d83c to de447aa Compare September 1, 2026 16:54
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 1, 2026
@jjenzz
jjenzz force-pushed the codex/filter-menu-v1 branch 2 times, most recently from d640544 to c91102a Compare September 1, 2026 17:12
@atomiks atomiks changed the title [filter menu] Add filterable menu component [menu] Add filterable menus Sep 3, 2026
@atomiks

atomiks commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

FilterMenu arch:

Screenshot 2026-09-03 at 7 41 34 pm

<Menu.FilterRoot> arch (Menu remains treeshakable)

Screenshot 2026-09-03 at 7 54 00 pm

@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 4, 2026
@github-actions github-actions Bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Sep 29, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 30, 2026
@github-actions github-actions Bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Sep 30, 2026
@github-actions github-actions Bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Oct 1, 2026
@atomiks
atomiks merged commit 0d4f7ba into mui:master Oct 1, 2026
24 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 1, 2026
michaldudak added a commit to michaldudak/base-ui that referenced this pull request Oct 7, 2026
The grid guard in useListNavigation is a standalone fix that mui#5586
shipped, not part of highlightItem. Without it, keys the grid does not
handle re-report the current highlight, which corrupts inline
Autocomplete input in grid mode.

Also keep three onItemHighlighted tests from mui#5527 that cover live
syncHighlightedItem behavior, now set up through keyboard and hover.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: menu Changes related to the menu component. type: new feature Expand the scope of the product to solve a new problem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[menu] Searchable Menu

4 participants