[combobox] New Combobox and Autocomplete components#2105
[combobox] New Combobox and Autocomplete components#2105atomiks merged 276 commits intomui:masterfrom
Combobox and Autocomplete components#2105Conversation
commit: |
Bundle size reportTotal Size Change: 🔺+301KB(+20.91%) - Total Gzip Change: 🔺+103KB(+20.17%) Show details for 71 more bundles@base-ui-components/react parsed: 🔺+36.7KB(+11.79%) gzip: 🔺+10.6KB(+10.66%) |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
docs/src/app/(public)/(content)/react/components/combobox/demos/hero/css-modules/index.tsx
Outdated
Show resolved
Hide resolved
41a4d0f to
04f2b69
Compare
|
it would be really nice this component will also support autoHighlight, similar to MUI Autocomplete. |
This comment was marked as outdated.
This comment was marked as outdated.
a851184 to
508c8de
Compare
5de6915 to
27f8e3e
Compare
586ccbc to
ca828da
Compare
michaldudak
left a comment
There was a problem hiding this comment.
I haven't found any serious issues and the API looks solid. But there are many potential use cases we might not considered, so let's release this and see how the community feels about it. In case there's something fundamentally wrong (which I doubt), we still have time to fix before v1.
Bundle size report
|
LukasTy
left a comment
There was a problem hiding this comment.
The components look amazing! 😍
That's a massive undertaking, awesome work. 💯 🚀
Sorry for a late review. 🙈
I will check a11y behavior next.
I have a behavioral observation:
The Autocomplete closes the items after searching and removing search query.
Is that the expected behavior? Or should it keep open with unfiltered items, just like before opening it?
Screen.Recording.2025-09-02.at.13.51.58.mov
| year: number; | ||
| } | ||
|
|
||
| const top100Movies: Movie[] = [ |
There was a problem hiding this comment.
General nitpick: Is there a way to share this data between CSS Modules and Tailwind examples? 🤔
| ); | ||
|
|
||
| const input = screen.getByRole<HTMLInputElement>('combobox'); | ||
| fireEvent.click(input); |
There was a problem hiding this comment.
Nitpick
| fireEvent.click(input); | |
| await user.click(input); |
|
|
||
| expect(input).not.to.have.attribute('data-focused'); | ||
|
|
||
| fireEvent.focus(input); |
There was a problem hiding this comment.
Nitpick: user.keyboard('{Tab}') would probably work as well. 🤔
Closes #222
Combobox
Preview: https://deploy-preview-2105--base-ui.netlify.app/react/components/combobox
Perf: https://deploy-preview-2105--base-ui.netlify.app/experiments/combobox-perf
Autocomplete
Preview: https://deploy-preview-2105--base-ui.netlify.app/react/components/autocomplete
FilterableMenu
Preview: https://deploy-preview-2105--base-ui.netlify.app/react/components/filterable-menu(will ship later)To investigate in the future, possibly as separate components or new parts:
Combobox+Tabs- different semantics to the regularTabswith virtual focus