Boolean if the menu should no longer close when the page is resized. Instead, it'll automatically update its position within the viewport.
Boolean if the menu should not be closed when the page is scrolled. Instead, it'll automatically update its position within the viewport. You normally don't want to enable this prop as the menu won't close if the menu control element is no longer in the viewport.
Boolean if the menu should be visible immediately once this component mounts.
Boolean if the menu should be rendered horizontally instead of vertically.
The id to use for the menu button and used to create the id for the menu.
The menu's id will just be ${id}-menu
.
A function to call for each item
in the items
list to render a
ReactElement.
A list of menu items to render. Each item will be passed to the
menuItemRenderer
function.
An optional className to pass to the menuRenderer
/Menu
component.
The label to use for the menu. Either this or the menuLabelledBy
props
are required for a11y.
The id for an element to label the menu. Either this or the menuLabel
props are required for a11y. This will be defaulted to the id
of the menu
button for convenience since it should normally label the menu but should
be changed if it does not.
A custom menu renderer to use. This defaults to just rendering the Menu
component with the base required props and a generated id from the button
id.
An optional style object to pass to the menuRenderer
/Menu
component.
Boolean if the portal should be used.
Optional options to pass down to the useFixedPositionin
hook styles to
change how the menu is fixed to the MenuButton
.
An optional function to call when the visibility of the menu changes.
Generated using TypeDoc
The positioning anchor for the menu relative to the button/control that owns the menu. This is used for the positioning logic as well as modifying the animationg slightly to originate from a coordinate. When this is omitted, it will default to: