Package org.patternfly.component.menu
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.
-
Method Summary
Modifier and TypeMethodDescriptionadd(MenuContent content) addContent(MenuContent content) Shortcut foraddFooter(menuFooter(text))addFooter(MenuFooter footer) Shortcut foraddHeader(menuHeader(text))addHeader(MenuHeader header) addSearchInput(MenuSearchInput searchInput) addSearchInput(MenuSearchInput searchInput, boolean noSeparator) flyout()Sets the--pf-v5-c-menu__content--MaxHeightvariable to the specified valuestatic Menumenu(MenuType menuType, SelectionMode selectionMode) static Menumenu(SelectionMode selectionMode) onAction(MenuActionHandler actionHandler) onMultiSelect(MultiSelectHandler<Menu, MenuItem> selectHandler) onSingleSelect(SelectHandler<MenuItem> selectHandler) voidvoidvoidvoidvoidvoidthat()Methods inherited from class org.patternfly.component.BaseComponent
componentType, elementMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jboss.elemento.Container
add, add, add, addAll, addAll, addAll, addAll, addAll, addAllMethods inherited from interface org.jboss.elemento.HasElement
add, apply, aria, aria, aria, attr, attr, attr, classList, classList, css, id, id, innerHtml, on, on, on, run, textContent, textNode, toggle, toggle, toggle, uniqueIdMethods inherited from interface org.jboss.elemento.HasHTMLElement
data, hidden, style, style, style, style, style, style, titleMethods inherited from interface org.patternfly.style.Modifiers.Plain
plain, plain
-
Method Details
-
addHeader
Shortcut foraddHeader(menuHeader(text)) -
addDivider
-
flyout
-
scrollable
-
favorites
-
height
Sets the--pf-v5-c-menu__content--MaxHeightvariable to the specified value -
that
- Specified by:
thatin interfaceTypedBuilder<HTMLDivElement,Menu>
-
onSingleSelect
-
onMultiSelect
-
select
-
select
-
select