- Implementation
- Custom Trigger Props
- TriggerReturnProps
Common Examples
Creating simple dropdown menus
TheMenu and Menu.Item components can be used to compose basic dropdown menus.Nesting menus in dropdowns
To create nested dropdown menus, simply add aMenu as a child of another Menu.Creating custom menu triggers
To use a custom trigger element, use thetrigger prop of the Menu, and omit the label prop (and any other prop meant to be passed to the default Button trigger).React Accessibility
When using a custom trigger, make sure that the trigger:- Can receive focus via keyboard when tabbing.
- Opens the menu when the user presses enter.
- Closes the menu and returns focus to the trigger when the user presses escape.