API reference

UiSetAnchor Class

Tracks the window-space bounds of content used to anchor a popup.
Create an anchor with UiSetAnchor.Companion.rememberAnchor, attach it with Modifier.anchor, and pass the same instance to a component such as Tooltip. The anchored popup can be emitted anywhere in the same composition; it does not need to wrap or share a layout parent with the anchored content.

Signature

@Stable class UiSetAnchor

Properties

boundsInWindow : IntRect
[Get]
Signature
var boundsInWindow: IntRect

Companion Object

Composables

rememberAnchor ()
Creates and remembers an anchor tracker.
Signature
@Composable fun rememberAnchor(): UiSetAnchor
Returns
UiSetAnchor