MenuItem

Register on Lenra

Element of type MenuItem

menuItem

This component is made to be used with the menu component. This will ensure that the styling is correct and that the menu items are properly sized.

Examples

Simple menuItem

{
    "type": "menuItem",
    "text": "Simple menuItem",
}
{
    "type": "menuItem",
    "text": "Menu Item",
    "icon": {
        "type": "icon",
        "value": "abc",
    },
    "onPressed": {
        "action": "pressed"
    }
}

Properties

AttributeDescriptionTypeDetails
typeThe type of the elementstring ("menuItem")
textThe text of the elementstring
disabledWhether the element should be disabled or not.boolean
iconcomponenttypestring ("icon")
isSelectedWhether the element is selected or not.boolean
onPressedBasic Listener