Compositions
MegaMenu
A header's full-width menu of catalogue sections: a trigger in the header opens a sheet beneath the shell's chrome, over a dimmed sidebar and page. It opens on a press, not on hover; Escape, a press on the page or choosing a link closes it, and focus returns to the trigger. Modal by default, so the page behind it is blocked and does not scroll. Import from "@instruments/materia-ui/compositions/mega-menu".
Usage
Best practices
Use it in a shell whose chrome is lifted (
Sidebar header, the fixedSidebarLayoutHeader): the panel fills the window from the top, beneath the chrome, so the brand row, search and actions stay on top of it.Keep it to navigation. Every entry is a
MegaMenuLink, which closes the menu as it navigates; actions belong in aDropdownMenu.
Props
MegaMenuContent
MegaMenuLink
MegaMenuSection
Also exports
- component
MegaMenu - interface
MegaMenuContentProps - interface
MegaMenuLinkProps - type
MegaMenuProps - interface
MegaMenuSectionProps - component
MegaMenuTrigger