DevExtreme v24.2 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

React Menu - Overview

Populate Menu with Data and Configure the Access to It

You can display Menu items from the items array or a dataSource. This demo contains an example of a data structure. If you use a dataSource, specify the displayExpr property.

To access the clicked item, use the onItemClick event handler function.

DevExtreme Accessibility Compliance
DevExtreme component libraries meet a variety of WCAG and Section 508 compliance standards. To assess this demo’s accessibility level, click the Run AXE® Validation button to launch the AXE® web accessibility evaluation tool.
All trademarks or registered trademarks are property of their respective owners. AXE® Terms of Use
The overall accessibility level of your application depends on the Menu features used.
To give you the ability to edit code on the fly, the demo uses SystemJS. For this reason, launching the demo takes some time. We strongly recommend that you do not use this approach in real projects.
Backend API

Configure the Menu

Use the orientation property to specify whether the Menu has horizontal or vertical orientation. Use the animation property to specify the type, delay, duration, and other options of show and hide menu actions.

Configure the Submenus

Clicking or a hovering a Menu item opens a drop-down menu that can contain several submenus. To specify the drop-down menu mode ("onClick" or "onHover"), use the showSubmenuMode property. If you need only to specify the first level of drop-down menus, use the showFirstSubmenuMode property.

If you want to hide the submenu when the mouse pointer leaves it, set the hideSubmenuOnMouseLeave property to true.

Customize Item Appearance

You can define specific fields in the item data objects to change the appearance of an item. For example, use the icon property to supply items with icons. Define an itemTemplate to customize item appearance.