TieredMenu displays submenus in nested overlays.
+Menu uses the common MenuModel API to define the items, visit
Menu requires a collection of menuitems as its model.
+Menu supports one level of nesting via subitems of an item.
+Menu is inline by default whereas popup mode is supported by enabling popup property and calling toggle method with an event of the target.
+ +Any attribute such as style and class are passed to the main container element. Following are the additional properties to configure the component.
+Name | +Type | +Default | +Description | +
---|---|---|---|
model | +array | +null | +An array of menuitems. | +
popup | +boolean | +false | +Defines if menu would displayed as a popup. | +
appendTo | +string | +null | +DOM element instance where the dialog should be mounted. | +
baseZIndex | +number | +0 | +Base zIndex value to use in layering. | +
autoZIndex | +boolean | +true | +Whether to automatically manage layering. | +
Name | +Parameters | +Description | +
---|---|---|
toggle | +event: Browser event | +Toggles the visiblity of the overlay. | +
show | +event: Browser event + target: Optional target if event.target would not be used |
+ Shows the overlay. | +
hide | +- | +Hides the overlay. | +
Following is the list of structural style classes, for theming classes visit
Name | +Element | +
---|---|
p-menu | +Container element. | +
p-menu-list | +List element. | +
p-menuitem | +Menuitem element. | +
p-menuitem-text | +Label of a menuitem. | +
p-menuitem-icon | +Icon of a menuitem. | +
None.
+