Skip to content

[MenuButton][base] Create the MenuButtonUnstyled component #32088

@michaldudak

Description

@michaldudak

After creating demos for #30961 it became clear that leaving implementation of menu buttons to developers would force them to write a lot of code. We can create an abstraction for a button that triggers the appearance of a menu and responds to keyboard input (in a slightly different way than a normal button - pressing up/down arrow keys should also open the menu).

Bonus points for making it work with SelectUnstyled.

Note: make sure that clicking on the button when menu is open does not cause blinking, as it's currently the case in MenuUnstyled demos (see #32661 (comment), point 1)

Metadata

Metadata

Assignees

Labels

breaking changeIntroduces changes that are not backward compatible.package: @mui/baseSpecific to @mui/base (legacy).scope: menuChanges related to the menu.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions