MdMenuItem

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.

Author

Maanrifa Bacar Ali

Constructors

Link copied to clipboard
constructor(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)

Properties

Link copied to clipboard
var disabled: <Error class: unknown class>

Disables the item and makes it non-selectable and non-interactive.

Link copied to clipboard
var href: <Error class: unknown class>

The URL that the item points to.

Link copied to clipboard
var keepOpen: <Error class: unknown class>

Keeps the menu open if clicked or keyboard selected.

Link copied to clipboard
open var parent: <Error class: unknown class>?
Link copied to clipboard
var selected: <Error class: unknown class>

Sets the item in the selected visual state when a submenu is opened.

Link copied to clipboard
var target: <Error class: unknown class>

Where to display the linked href URL for a link button. Common options include _blank to open in a new tab.

Link copied to clipboard
var type: <Error class: unknown class>

Sets the behavior and role of the menu item.

Link copied to clipboard
var typeaheadText: <Error class: unknown class>

The text that is selectable via typeahead. If not set, defaults to the innerText of the item slotted into the headline slot.

Functions

Link copied to clipboard
open override fun afterCreate(node: <Error class: unknown class>)
Link copied to clipboard
open fun buildAttributeSet(attributeSetBuilder: <Error class: unknown class>)
Link copied to clipboard
open fun dispose()
Link copied to clipboard
open override fun headline(component: <Error class: unknown class>?)
Link copied to clipboard
fun HasHeadlineSlot.headline(text: String): <Error class: unknown class>

Sets the text to the headline slot.

Link copied to clipboard
open override fun leading(component: <Error class: unknown class>?)
Link copied to clipboard

Sets the icon identified by name to the leading slot.

Link copied to clipboard
open fun render(): <Error class: unknown class>
Link copied to clipboard
open override fun supportingText(component: <Error class: unknown class>?)
Link copied to clipboard
fun HasSupportingTextSlot.supportingText(text: String): <Error class: unknown class>

Sets the text to the supporting text slot.

Link copied to clipboard
open override fun trailing(component: <Error class: unknown class>?)
Link copied to clipboard

Sets the icon identified by name to the trailing slot.