Skip to content

FloatingMenuOptions

Defined in: components/menu.ts:66

Options for showFloatingMenu.

items: MenuEntry[]

Defined in: components/menu.ts:68

Items to show.


anchor: HTMLElement

Defined in: components/menu.ts:70

Element to anchor the menu to (positioned just below it, flips up if needed).


optional at?: object

Defined in: components/menu.ts:76

Position the menu at this viewport point (e.g. a pointer location) instead of just below the anchor. Used by addContextMenu to open at the exact click/tap target.

x: number

y: number


optional closeOnAnchorClick?: boolean

Defined in: components/menu.ts:82

Also close the menu when the anchor itself is clicked. By default a click on the anchor is ignored (so a trigger button can run its own toggle), but a context menu — whose anchor has no click handler — wants the click to close.


optional dropdownAttrs?: string

Defined in: components/menu.ts:84

Aberdeen attr/style string on the floating panel.