MENU Property Type
Many components allow for a popup menu on right click using the menu shared property which takes an ARRAY of type MENU.
"menu": [
{
"text": "First item",
"action": { ... }
},
{
"type": "Separator"
},
{
"text": "Second item",
"action": { ... }
}
]
Properties
- type
- ENUM
- Default:
"text"
| Value | Description |
|---|---|
"text" |
Text standard text menu item. |
"separator" |
A separator between items. |
TipIn general, there is no need to provide a
typeunless you want a separator. When using a separator,textandvalueare ignored.
- state
- ENUM
- Default:
"off"
| Value | Description |
|---|---|
"off" |
A normal menu item with no state. |
"on" |
A menu item with a tick. |
"mixed" |
A menu item with a dash. |
Useful for dynamically created popup menus using the popupmenu JSON Action.