MenuItem
Defined in: widgets/controls/menu.ts:20
One row in a MenuListWidget. An action row has a label; a row with
separator: true is a non-interactive divider (its other fields are ignored).
A row with a submenu opens a nested menu instead of firing onSelect.
Properties
Section titled “Properties”danger?
Section titled “danger?”
optionaldanger?:boolean
Defined in: widgets/controls/menu.ts:30
Draw in the theme $error colour — for destructive actions.
disabled?
Section titled “disabled?”
optionaldisabled?:boolean
Defined in: widgets/controls/menu.ts:28
Dim and unselectable (skipped by keyboard nav and clicks).
optionalicon?:string
Defined in: widgets/controls/menu.ts:26
Leading glyph drawn before the label (one or two cells).
label?
Section titled “label?”
optionallabel?:string
Defined in: widgets/controls/menu.ts:22
Action text. Omit only when separator is set.
separator?
Section titled “separator?”
optionalseparator?:boolean
Defined in: widgets/controls/menu.ts:32
Render as a horizontal divider instead of an action row.
shortcut?
Section titled “shortcut?”
optionalshortcut?:string
Defined in: widgets/controls/menu.ts:24
Right-aligned hint, typically a shortcut (“Ctrl+C”, “⌘V”). Ignored when submenu is set.
submenu?
Section titled “submenu?”
optionalsubmenu?:MenuItem[]
Defined in: widgets/controls/menu.ts:34
Nested rows; the row shows a ▸ and opens this menu to the side instead of selecting.
value?
Section titled “value?”
optionalvalue?:unknown
Defined in: widgets/controls/menu.ts:36
Opaque payload handed back via onSelect (defaults to the row index).