Package-level declarations

Material web menu components (menu, menu item, submenu).

Types

Link copied to clipboard
Link copied to clipboard

DSL Marker for menu building.

Link copied to clipboard
open class MdMenu(anchor: String? = null, positioning: MenuPositioning = MenuPositioning.Absolute, quick: Boolean = false, hasOverflow: Boolean = false, xOffset: Int = 0, yOffset: Int = 0, typeaheadDelay: Int = DEFAULT_TYPEAHEAD_DELAY, anchorCorner: Corner = Corner.EndStart, corner: Corner = Corner.StartStart, stayOpenOnOutsideClick: Boolean = false, stayOpenOnFocusout: Boolean = false, skipRestoreFocus: Boolean = false, defaultFocus: FocusState = FocusState.FirstItem, noNavigationWrap: Boolean = false, className: String? = null, init: MdMenu.() -> Unit? = null) : MdListContainer<MdMenuItem>

Menus display a list of choices on a temporary surface.

Link copied to clipboard
open class MdMenuItem(disabled: Boolean = false, type: MenuItemType = MenuItemType.MenuItem, href: String? = null, target: LinkTarget? = null, keepOpen: Boolean = false, selected: Boolean = false, typeaheadText: String? = null, className: String? = null, init: MdMenuItem.() -> Unit? = null) : MdItemWidget, HasHeadlineSlot, HasLeadingSlot, HasSupportingTextSlot, HasTrailingSlot

Menu items are element that belongs to a menu.

Link copied to clipboard
open class MdSubMenu(anchorCorner: Corner = Corner.EndStart, corner: Corner = Corner.StartStart, hoverOpenDelay: Int = DEFAULT_HOVER_OPEN_DELAY, hoverCloseDelay: Int = DEFAULT_HOVER_CLOSE_DELAY, className: String? = null, init: MdSubMenu.() -> Unit? = null) : MdWidget

Submenus is nested inside a menu and display a list of choices on a temporary surface.

Link copied to clipboard
interface MenuAnchor<W : Widget> : Component

Component which holds a menu and its anchor.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
external interface Reason

Functions

Link copied to clipboard

Requests the parent menu to activate the typeahead functionality when a submenu closes. Event.bubbles, Event.composed.

Link copied to clipboard
fun SnOn<MdMenu>.closed(block: (Event) -> Unit)

Fired once the menu is closed, after any animations.

Link copied to clipboard

Closes the encapsulating menu on closable interaction. CustomEvent.bubbles, CustomEvent.composed

Link copied to clipboard
fun SnOn<MdMenu>.closing(block: (Event) -> Unit)

Fired before the closing animation begins.

Link copied to clipboard

Requests the parent menu to deselect other items when a submenu opens. Event.bubbles, Event.composed.

Link copied to clipboard

Requests the parent menu to deactivate the typeahead functionality when a submenu opens. Event.bubbles, Event.composed.

Link copied to clipboard
fun Container.menu(anchor: String? = null, positioning: MenuPositioning = MenuPositioning.Absolute, quick: Boolean = false, hasOverflow: Boolean = false, xOffset: Int = 0, yOffset: Int = 0, typeaheadDelay: Int = DEFAULT_TYPEAHEAD_DELAY, anchorCorner: Corner = Corner.EndStart, corner: Corner = Corner.StartStart, stayOpenOnOutsideClick: Boolean = false, stayOpenOnFocusout: Boolean = false, skipRestoreFocus: Boolean = false, defaultFocus: FocusState = FocusState.FirstItem, noNavigationWrap: Boolean = false, className: String? = null, init: MdMenu.() -> Unit? = null): MdMenu
Link copied to clipboard
fun <W : Widget> MenuAnchor(anchor: W, position: Position = Position.RELATIVE, initMenu: SimplePanel.() -> MdMenu): MenuAnchor<W>

Factory for obtaining an instance of MenuAnchor.

Link copied to clipboard
fun <W : Widget> Container.menuAnchor(anchor: W, position: Position = Position.RELATIVE, initMenu: SimplePanel.() -> MdMenu): MenuAnchor<W>

Factory for obtaining an instance of MenuAnchor. The returned component is added to this Container.

Link copied to clipboard
fun MdMenu.menuItem(disabled: Boolean = false, type: MenuItemType = MenuItemType.MenuItem, href: String? = null, target: LinkTarget? = null, keepOpen: Boolean = false, selected: Boolean = false, typeaheadText: String? = null, className: String? = null, init: MdMenuItem.() -> Unit? = null): MdMenuItem
Link copied to clipboard
fun SnOn<MdMenu>.opened(block: (Event) -> Unit)

Fired once the menu is open, after any animations.

Link copied to clipboard
fun SnOn<MdMenu>.opening(block: (Event) -> Unit)

Fired before the opening animation begins.

Link copied to clipboard

Requests the parent to make the slotted item focusable and focus the item. Event.bubbles, Event.composed.

Link copied to clipboard
fun MdMenu.submenu(anchorCorner: Corner = Corner.EndStart, corner: Corner = Corner.StartStart, hoverOpenDelay: Int = DEFAULT_HOVER_OPEN_DELAY, hoverCloseDelay: Int = DEFAULT_HOVER_CLOSE_DELAY, className: String? = null, init: MdSubMenu.() -> Unit? = null): MdSubMenu