Menu

Menus provide a list of options for the user to choose from.

Undo Redo Cut Copy Paste Delete

Menus work really well when used inside dropdowns.

To create a submenu, nest an <ods-menu slot="submenu"> in any menu item.

Menus work really well when used inside dropdowns.

See Menu Header for more information.

You can listen for the ods-select event to determine which menu item was selected. The menu item element will be exposed in event.detail.item.

Cut Copy Paste Find Replace
import '@ods/components/web.menu';

Note: You only need to import a web component once in your code, as it registers itself globally when defined, allowing you to use it anywhere within your application without needing to re-import it each time you want to use the component.

Slots

NameDescription
(default)The menu's content, including menu items, menu labels, and dividers.

Events

React EventDescriptionEvent Detail
ods-selectEmitted when a menu item is selected.--

Search