BaseMenu
BaseMenu serves as a building block for the library's menu components. Library consumers may use it if they have requirements not fulfilled by the branded option, AisMenu. The BaseMenu component wraps these other, related components: BaseMenuItem, BaseMenuGroup and BaseMenuDivider
Props
The following props are exposed to allow you to define and style your menu to fit your needs:
Menu Button
labelthe text that should be displayed on the menu buttonbuttonClassis for adding classes to the menu button containericonis for designating an icon to appear on the left side of the menu buttoniconClassis for adding classes to the icon on the left side of the menu buttonarrowIconis for designating which arrow icon to appear on the right side of the menu buttonarrowClassis for adding classes to the arrow icon on the right side of the menu button
Menu Items
This is the menu dropdown container, which contains one or more Menu Items
itemsClassis for adding classes to the menu items containeritemsthe Array of menu items that should be displayed in the dropdown menu container. Menu items can also be passed in via the default slot using the BaseMenuItem component
Menu Item
itemClassis for adding classes to each of the menu itemsactive-classfor styling the menu items, including nested menu buttons, when hovering.itemIconClassis for adding classes to the icon on the left side of each menu item
Alignment & Positioning
rightwhentruethis right-aligns the dropdown menu container with the right side of the menu button.dropupwhentruethe dropdown menu container appears above the menu buttondroprightwhentruethe dropdown menu container appears to the right of the menu buttondropleftwhentruethe dropdown menu container appears to the left of the menu button
Rendering
The following props allow for flexibility around what element each piece of the menu component is rendered as:
asthis indicates what element the menu wrapper should be rendered as. The default istemplatebuttonAsthis indicates what element the menu button should be rendered as. The default isdivitemsAsthis indicates what element the dropdown menu container should be rendered as. The default isdivitemAsthis indicates what element each menu item should be rendered as. The default istemplate