All things Menu



API Reference

useMenuBarStoreDeprecated: Use useMenubarStore instead.
useMenuBarContextDeprecated: Use useMenubarContext instead.
useMenuContextReturns the menu store from the nearest menu container.
useMenuStoreCreates a menu store to control the state of Menu components.
MenuRenders a dropdown menu element that's controlled by a MenuButton component.
MenuArrowRenders an arrow element inside a Menu component that points to its MenuButton.
MenuBarDeprecated: Use Menubar instead.
MenuBarProviderDeprecated: Use MenubarProvider instead.
MenuButtonRenders a menu button that toggles the visibility of a Menu component when clicked or when using arrow keys.
MenuButtonArrowDisplays an arrow within a MenuButton, pointing to the Menu position. It's typically based on the placement state from the menu store, but this can be overridden with the placement prop.
MenuDescriptionRenders a description in a menu. This component must be wrapped with a Menu component so the aria-describedby prop is properly set on the menu element.
MenuDismissRenders a button that hides a Menu when clicked.
MenuGroupRenders a group for MenuItem elements. Optionally, a MenuGroupLabel can be rendered as a child to provide a label for the group.
MenuGroupLabelRenders a label in a menu group. This component should be wrapped with MenuGroup so the aria-labelledby is correctly set on the group element.
MenuHeadingRenders a heading in a menu. This component must be wrapped within Menu so the aria-labelledby prop is properly set on the content element.
MenuItemRenders a menu item inside MenuList or Menu components.
MenuItemCheckRenders a checkmark icon when the checked prop is true. The icon can be overridden by providing a different one as children.
MenuItemCheckboxRenders a menuitemcheckbox element within a Menu component. The name prop must be provided to identify the field in the values state.
MenuItemRadioRenders a menuitemradio element within a Menu component. The name prop must be provided to identify the field in the values state.
MenuListRenders a menu list element. This is the primitive component used by the Menu component.
MenuProviderProvides a menu store to Menu components.
MenuSeparatorRenders a divider between MenuItem, MenuItemCheckbox, and MenuItemRadio elements.

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue