A menu offers a list of choices to the user, such as a set of actions or functions. Choosing an item in a menu typically opens a sub menu, or invokes a command.
Installation
<script type="module">
import '@nvidia-elements/core/menu/define.js';
</script>
<nve-menu>
<nve-menu-item>item 1</nve-menu-item>
<nve-menu-item>item 2</nve-menu-item>
<nve-menu-item>item 3</nve-menu-item>
<nve-menu-item>item 4</nve-menu-item>
</nve-menu>
Selected
Indicates whether an element currently holds selection within a multi-option selection group. MDN
Menu with a selected item showing the visual state for user-selected options.
Current
Indicates the element that represents the user's current location or position within a set. MDN
Menu with a current page item showing the visual state for the active/current page in navigation.
Border Background
By default Menu will show a blue border on the selected item. You can change the border color by setting --border-background on the <nve-menu-item>
Disabled
This Boolean attribute prevents the user from interacting with the element: it cannot receive press or focus events. MDN
Menu with disabled items showing unavailable options while maintaining visual context.
Icons
Menu items with icons to add visual context and improve usability.
Scroll
Menu with constrained height showing scrollable behavior when content exceeds container limits.
Dropdown
Menu with keyboard navigation and ARIA disclosure pattern inside a dropdown. Use when menu items need accessible focus management and arrow key navigation.
Vertical Navigation Drawer
Use a navigation drawer to overlay page content for out-of-context navigation.
Vertical Navigation Panel
Use an inline navigation panel to push page content aside when navigation is contextual to the page.
Menu Item Tooltip
Use a tooltip on a menu item to provide extra context and warnings.
Complex
Use a dropdown menu with search and branded logos for application selection interfaces.
Links
Menu items with links for navigation functionality within menu structures.
Suffix Slot
Menu item features a default slot for content, along with a suffix slot for displaying elements such as keyboard shortcuts at the end of the menu item container.
Danger Status
Menu items with danger status styling for destructive actions like delete or logout operations.
Release Status
All elements and features go through 3 phases of stability, pre-release, beta and stable.