Skip to content

FloatingHandle

Defined in: ui/src/floating.ts:30

One live floating element. The owner parents content into container; the overlay re-anchors it to getReference() every frame and asks the owner-supplied setLayout callback for the content’s shrink-to-content size — so the overlay stays agnostic of how that content is built (React reconciler tree, hand-built UIPanels, …).

readonly container: DisplayContainer

Defined in: ui/src/floating.ts:31

bringToFront(): void

Defined in: ui/src/floating.ts:52

Restack above all current floats (call when (re)opening).

void


invalidateLayout(): void

Defined in: ui/src/floating.ts:48

Re-run content layout on the next overlay update.

Call this after changing content without replacing the layout callback. Trigger movement, viewport changes, config changes, and reopening are detected automatically.

void


release(): void

Defined in: ui/src/floating.ts:53

void


setActive(active): void

Defined in: ui/src/floating.ts:50

Show/position (true) or hide (false) without releasing.

boolean

void


setConfig(cfg): void

Defined in: ui/src/floating.ts:33

FloatConfig

void


setLayout(fn): void

Defined in: ui/src/floating.ts:40

Supply how the float’s content is laid out shrink-to-content for a given maxWidth (undefined → natural width). Returns the stacked size. The React side feeds reconciler roots through layoutFloat; the imperative side lays out the node it parented in.

(maxWidth) => Dimensions

void


setReference(get): void

Defined in: ui/src/floating.ts:32

() => UIElement | null

void