Box

fun TileSchemaBuilderScope.Box(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, alignment: AlignmentSchema.TwoDimensional = alignToTopStart(), tiles: TileSchemaBuilderScope.() -> Unit = {})

Renders a Compose Box that stacks tiles on top of each other in declaration order (later children paint above earlier ones), all positioned by alignment. Never scrollable, and publishes no scope CompositionLocal, so children cannot use column/row scope modifiers such as weight. Dispatches onDisplay once when composed; onClick/onLongPress are wired only when the matching event is declared on this tile — with neither declared, the box is not made interactive.

Parameters

id

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

events

Events owned by this tile, wired to its triggers (onDisplay, onClick, onLongPress).

style

Layout/appearance modifiers (size, padding, background, etc).

visibility

Whether the tile is shown, hidden but occupies space, or removed from layout. Defaults to visible.

searchableTerms

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

alignment

Alignment applied to every child. Defaults to aligned to the top start.

tiles

Child tiles stacked on top of each other inside the box. Defaults to none.