Skip to content

Interface: UseBubbleMenuResult ​

Returned by useBubbleMenu().

Properties ​

PropertyModifierTypeDescription
referencereadonlyVirtualReferenceWhere the selection is; give it to your positioning code (e.g. Floating UI).
statereadonlyReadonly<ShallowRef<BubbleMenuState>>The controller state as a shallow ref; updated on the client while the scope is alive.

Methods ​

dismiss() ​

ts
dismiss(): void;

Hide until the selection changes; focus goes back to the editor.

Returns ​

void


focusFirst() ​

ts
focusFirst(): void;

Move focus to the first control in the bubble (what the focus shortcut does).

Returns ​

void


getBubbleProps() ​

ts
getBubbleProps(): VueProps;

Props for the bubble element: id and data-state (open or closed). Escape dismisses it, and mousedown outside form fields is prevented to keep the selection.

Returns ​

VueProps