Live demo
Demo source
nv-menuitem is one action in a menu. It shows
a label with an optional icon and shortcut hint, and hasSubmenu adds a
chevron when it triggers a nested menu. Give each item a name: it arrives in
the menuitemSelected event. A disabled item is skipped by keyboard
navigation and cannot be chosen.
Anatomy
The menu anatomy shows menu items with their labels, icons, shortcuts and submenu indicators in the menu composition.
Usage
Use concise action labels, group related choices and add icons only when
they improve recognition. shortcut only displays text; the application
must register the actual key combination. Custom label content goes in the
default slot. Item and divider partials exist in Figma, but code uses
nv-menuitem plus standard HTML separators. Resting, hover and disabled
styles follow the menu theme.