Menu widget


The Magento menu widget is a customized jQuery UI Menu widget. Magento menu extends the default functionality with the following:

  • expanding all layers of the menu tree past the second layer
  • declaring a responsive menu
  • setting hover delay

The Magento menu widget source is lib/web/mage/menu.js.

For information about how to initialize a widget in a JS component or .phtml template, see the Initialize JavaScript topic.

Menu widget options mostly coincide with the options of the jQuery UI Menu widget, with addition of the following custom ones:


Set the delay length of opening submenu.

Type: Number

Default value: 300


Setting the default responsive handler for the navigation widget.

Type: Boolean.

Default value: false


Display top level navigational items in mobile menu or all items.

Type: Boolean.

Default value: false

The Magento menu widget has all default jQuery UI menu widget methods and events.