Menu

Small, toggleable containers often used for navigation

Demo

See more examples

API

Tag

Name Type Content
m-menu Custom Element trigger and items slots only

Slots

Name Element Content
trigger button is recommended, but other elements will work Any
items div Any. Link children have a default styling.

Attributes

Name Value Description
open Boolean attribute When present the menu is shown; otherwise, it's hidden.

Events

Name Detail Description
toggle None Fires after the menu was opened or closed.

Guidelines

What about <menu>?

This component is only loosely based on the HTMLMenuElement interface because that spec is incomplete and looks to be deprecated.

Accessibility

There are no accessibility recommendations for menu at this time. This post https://adrianroselli.com/2017/10/dont-use-aria-menu-roles-for-site-nav.html seems reasonable and accurate enough to say that simple markup like anchor tags in menus is sufficient.