FlexBox

fun TileSchemaBuilderScope.FlexBox(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, filterChildrenByTerm: String? = null, direction: FlexBoxTileSchema.FlexDirectionSchema = flexDirectionRow(), justifyContent: FlexBoxTileSchema.FlexJustifyContentSchema = flexJustifyStart(), alignItems: FlexBoxTileSchema.FlexAlignItemsSchema = flexAlignItemsStart(), alignContent: FlexBoxTileSchema.FlexAlignContentSchema = flexAlignContentStart(), wrap: FlexBoxTileSchema.FlexWrapSchema = flexNoWrap(), columnGap: Int = 0, rowGap: Int = 0, tiles: TileSchemaBuilderScope.() -> Unit)

Renders a Compose CSS-flexbox layout hosting tiles. direction sets the main axis (and its reversal), justifyContent distributes children along the main axis, alignItems aligns children on the cross axis of a single line, alignContent distributes the lines themselves (only takes effect when wrap allows multiple lines), and wrap controls whether items wrap. columnGap / rowGap are in dp. Publishes its flex scope to children so they can use flex modifiers (grow, shrink, basis, align-self). When filterChildrenByTerm is set, only children whose searchableTerms contain that term (case-insensitive substring match) are rendered — children without searchableTerms are filtered out. Never scrollable — every child is composed eagerly. Dispatches onDisplay once when composed, onClick only when declared.

Parameters

id

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

events

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

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.

filterChildrenByTerm

Term used to filter tiles by their own searchableTerms. Defaults to none (no filtering).

direction

Main axis direction. Defaults to row.

justifyContent

Distribution of children along the main axis. Defaults to start.

alignItems

Alignment of children on the cross axis. Defaults to start.

alignContent

Distribution of wrapped lines; only takes effect when wrap allows wrapping. Defaults to start.

wrap

Whether items wrap onto multiple lines. Defaults to no wrap.

columnGap

Horizontal spacing between items, in dp. Defaults to 0.

rowGap

Vertical spacing between items, in dp. Defaults to 0.

tiles

Child tiles laid out with flexbox semantics.