AdaptiveVisibility

fun TileSchemaBuilderScope.AdaptiveVisibility(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, widthVisibility: AdaptiveVisibilityTileSchema.WidthVisibility = widthVisibleUntilExtraLarge(), heightVisibility: AdaptiveVisibilityTileSchema.HeightVisibility = heightVisibleUntilExpanded(), tiles: TileSchemaBuilderScope.() -> Unit)

Conditionally renders tiles based on the current window size class. Children are composed only when both widthVisibility and heightVisibility are satisfied — otherwise nothing is emitted (the children are not composed, not merely hidden). VisibleFrom(breakpoint) shows from the rank above the given breakpoint upwards (exclusive); VisibleUntil(breakpoint) shows at or below it (inclusive). Width and height are evaluated independently, so one may be satisfied while the other is not — in that case the children still stay hidden. When both conditions hold, the children are hosted in a Box carrying style and visibility. Dispatches onDisplay once when composed regardless of the breakpoints, and dispatches the width/height satisfied/not-satisfied triggers on first composition and on every condition change.

Parameters

id

Unique identifier of the tile. Defaults to a random id.

events

Events owned by this tile, wired to its triggers (onDisplay, width/height breakpoint satisfied/not-satisfied).

style

Layout/appearance modifiers applied to the wrapping Box when children are shown.

visibility

Whether the wrapping Box is shown, hidden but occupies space, or removed from layout, when children are shown. Defaults to visible.

searchableTerms

Terms used by an ancestor's search/filter to decide whether this tile matches. Defaults to none.

widthVisibility

Width breakpoint condition that must hold for the children to render. Defaults to visible until extra large.

heightVisibility

Height breakpoint condition that must hold for the children to render. Defaults to visible until expanded.

tiles

Child tiles rendered only when both breakpoint conditions are satisfied.