API

API Reference e-navigation

HTML Attributes API

Name Description Type Required Default value
menu Describes the menu items and their submenus. See example below. array (example) []
sticky If true the menu is always open boolean false
open-delay After hovering how many milliseconds delay has the opening animation number 300

*: An example of a menu property value:

[
  {
    id: "<identifier for the menu>",
    active_matcher: "<at which condition the menu is displayed active>",
    url: "",
    type: "menu_item",
    text: "<displayed menu text>",
    submenu: [
      {
        id: "<identifier for the submenu>",
        group: "<grouping within submenu name>",
        active_matcher: "<at which condition the submenu is displayed active>",
        url: "<where the submenu item points>",
        type: "menu_item",
        text: "<displayed submenu text>"
      }
    ]
  }
]

Events

Event Description Returns
trigger Fires on clicking a menu item.
{
  detail: {
    id: "[clicked menu item]",
    element: "[the originally clicked element]"
  }
}