Skip to content

@tavora/sdk / MenuRequest

Interface: MenuRequest ​

Defined in: packages/sdk/src/protocol.ts:1186

What ui.showMenu shows, and where.

Properties ​

align? ​

optional align?: "start" | "center" | "end"

Defined in: packages/sdk/src/protocol.ts:1198

How the menu lines up with at along that side. Default "start".


at ​

at: object

Defined in: packages/sdk/src/protocol.ts:1194

Where, in the panel's CSS pixels from its top left corner: the rectangle of the element the menu is for (a button, or the row that was right-clicked). The menu opens next to it, never on top of it; pass the element's box for a context menu too, not the pointer. A bare point still works. Tavora keeps the menu inside the window.

height? ​

optional height?: number

width? ​

optional width?: number

x ​

x: number

y ​

y: number


items ​

items: MenuEntry[]

Defined in: packages/sdk/src/protocol.ts:1187


side? ​

optional side?: "bottom" | "top" | "right" | "left"

Defined in: packages/sdk/src/protocol.ts:1196

Which side of at the menu opens on, when there is room. Default "bottom".

For Tavora 0.23.9 and @tavora/sdk 0.3.3. Code under the MIT License. The Tavora name and logo are not covered by it.