LavaUI docs

struct OverlayPlacement

Swift

struct OverlayPlacement

Placement policy for a detached overlay.

The callback receives the presenter, viewport, and content's natural size, and returns the window-space frame the overlay should occupy. The result is clamped to the viewport before layout.

Sources/LavaUI/Overlay.swift:53

Constructors

init(_ resolve: @escaping @Sendable (OverlayPlacementContext) -> OverlayFrame)

Not documented.

Sources/LavaUI/Overlay.swift:56

Methods

static func viewport(inset: Float = 0) -> OverlayPlacement

Fill the viewport while leaving an even margin around the surface.

Sources/LavaUI/Overlay.swift:63