Class Menu

All Implemented Interfaces:
Container<HTMLDivElement,Menu>, Finder<HTMLDivElement>, HasElement<HTMLDivElement,Menu>, HasHTMLElement<HTMLDivElement,Menu>, IsElement<HTMLDivElement>, TypedBuilder<HTMLDivElement,Menu>, Component, Modifiers.Plain<HTMLDivElement,Menu>
Direct Known Subclasses:
DropdownMenu, SingleSelectMenu

public class Menu extends BaseComponent<HTMLDivElement,Menu> implements Modifiers.Plain<HTMLDivElement,Menu>
A menu is a list of options or actions that users can choose from. It can be used in a variety of contexts whenever the user needs to choose between multiple values, options, or actions. A menu is most often paired with a MenuToggle as its trigger, but can also be used inline or can be attached to other interactable elements to toggle it open and close.

Menu menu = menu(MenuType.menu, click)
        .scrollable()
        .height("200px")
        .addHeader("Header")
        .addContent(menuContent()
                .addList(menuList()
                        .addItem(MenuItem.actionMenuItem("1", "Item 1"))
                        .addItem(MenuItem.actionMenuItem("2", "Item 2"))
                        .addDivider()
                        .addItem(MenuItem.linkMenuItem("3", "Item 3", "#third"))))
        .addFooter(menuFooter()
                .add(button("Footer")));
See Also: