TopAppBar

fun TileSchemaBuilderScope.TopAppBar(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, navigationIcon: TileSchemaBuilderScope.() -> Unit? = null, actions: TileSchemaBuilderScope.() -> Unit? = null, barStyle: TopAppBarTileSchema.TopAppBarStyle = defaultTopAppBar(), title: TileSchemaBuilderScope.() -> Unit)

Renders a Material 3 top app bar. barStyle picks the visual variant — default, center aligned, medium or large (the medium/large variants do not collapse on scroll, since the bar has no scroll behavior wired). title fills the title slot, navigationIcon the leading slot and actions the trailing slot; the latter two render as empty slots when omitted. The bar itself dispatches no triggers and is not clickable — wire events on the slot tiles (typically IconButtons) instead.

Parameters

id

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

events

Events owned by this tile. Never fired, since the bar dispatches no triggers.

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.

navigationIcon

Tile rendered in the leading slot (typically an IconButton). Defaults to none.

actions

Tiles rendered in the trailing slot. Defaults to none.

barStyle

Visual variant of the bar — defaultTopAppBar, centerAlignedTopAppBar, mediumTopAppBar or largeTopAppBar. Defaults to default.

title

Tile rendered in the title slot (most often a SimpleText). Required.