Package-level declarations

Functions

Link copied to clipboard
fun TileSchemaBuilderScope.Popup(id: String = randomId(), style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, expanded: Boolean = false, alignment: AlignmentSchema.TwoDimensional = alignToTopStart(), offsetX: Int = 0, offsetY: Int = 0, focusable: Boolean = false, dismissOnBackPress: Boolean = true, dismissOnClickOutside: Boolean = true, events: EventSchemaBuilderScope.() -> Unit = {}, tiles: TileSchemaBuilderScope.() -> Unit, popupTiles: TileSchemaBuilderScope.() -> Unit)

Renders an anchor — tiles, laid out with Box semantics and carrying style and visibility — with a floating popup containing popupTiles over it. The popup is only composed while expanded is true. alignment places the popup relative to the anchor's bounds, and offsetX / offsetY (in dp) are applied on top of that: top/bottom alignments put the popup fully above/below the anchor with offsetY as the gap, start/end-center alignments put it fully to the side with offsetX as the gap (mirrored under RTL), and corner alignments flush-align the popup's matching edge with the anchor's, with offsetX as a plain translation. The final position is clamped to the window, so the popup can never be pushed off screen. focusable, dismissOnBackPress and dismissOnClickOutside control how it can be dismissed. A dismissal (back press, tap outside) flips expanded locally on the client, with no server round trip needed; opening and closing from the server side is done with a TogglePopup event pointing at this tile's id — typically wired to the anchor's click. style and visibility apply to the anchor only — the popup renders in its own window, unaffected by them, and its content is unstyled and undecorated, so wrap popupTiles in a Card or a styled Box for a surface behind it. Dispatches no triggers at all — wire events on the anchor and popup tiles instead.