Interface: ShowMenuOptions
Defined in: packages/sdk/src/ui-service.ts:245
Options for UiService.showMenu. Position resolves in the order anchor → at → the current cursor (so showMenu({ items }) with no position opens at the mouse, which is what a right-click handler wants).
Properties
items
items: MenuEntry[];Defined in: packages/sdk/src/ui-service.ts:247
The rows to show, top to bottom.
at?
optional at?: object;Defined in: packages/sdk/src/ui-service.ts:249
Explicit viewport point — e.g. a right-click's clientX/clientY.
x
x: number;y
y: number;anchor?
optional anchor?: HTMLElement | null;Defined in: packages/sdk/src/ui-service.ts:251
Anchor element to hang the menu off (for a button dropdown).
align?
optional align?: "start" | "end";Defined in: packages/sdk/src/ui-service.ts:253
Align the menu to the anchor's left ("start", default) or right ("end").
toggle?
optional toggle?: boolean;Defined in: packages/sdk/src/ui-service.ts:261
Toggle an anchored dropdown. When true (the default), calling showMenu again with the same anchor while that menu is still open closes it instead of reopening — so a second click on the button dismisses its dropdown. Set false to keep the legacy always-(re)open behaviour. Has no effect without an anchor (cursor / at menus always open).