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 PanelNodes, …).
Properties
Section titled “Properties”container
Section titled “container”
readonlycontainer:Container
Defined in: ui/src/floating.ts:31
Methods
Section titled “Methods”bringToFront()
Section titled “bringToFront()”bringToFront():
void
Defined in: ui/src/floating.ts:44
Restack above all current floats (call when (re)opening).
Returns
Section titled “Returns”void
release()
Section titled “release()”release():
void
Defined in: ui/src/floating.ts:45
Returns
Section titled “Returns”void
setActive()
Section titled “setActive()”setActive(
active):void
Defined in: ui/src/floating.ts:42
Show/position (true) or hide (false) without releasing.
Parameters
Section titled “Parameters”active
Section titled “active”boolean
Returns
Section titled “Returns”void
setConfig()
Section titled “setConfig()”setConfig(
cfg):void
Defined in: ui/src/floating.ts:33
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
setLayout()
Section titled “setLayout()”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.
Parameters
Section titled “Parameters”(maxWidth) => Dimensions
Returns
Section titled “Returns”void
setReference()
Section titled “setReference()”setReference(
get):void
Defined in: ui/src/floating.ts:32
Parameters
Section titled “Parameters”() => UIElement | null
Returns
Section titled “Returns”void