FloatingActionButton

fun TileSchemaBuilderScope.FloatingActionButton(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = { size( width = wrapHorizontally(), height = wrapVertically() ) }, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, icon: IconSchema, size: FloatingActionButtonTileSchema.Size = defaultFloatingActionButon())

Renders a Material 3 floating action button. Its size is picked by size (default/small, medium or large), which also scales icon accordingly (24dp, 28dp or 36dp). Dispatches onClick when tapped.

There's no enabled/loading here — Material 3 FABs don't take an enabled parameter by design, since a disabled FAB fights the emphasis it's meant to carry. Hide the FAB via visibility instead when its action isn't currently available.

Parameters

id

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

events

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

style

Layout/appearance modifiers (size, padding, background, etc). Defaults to wrapping its content.

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.

icon

Icon rendered inside the FAB; its size is overridden based on size.

size

Size of the FAB — defaultFloatingActionButon (small), mediumFloatingActionButon or largeFloatingActionButon. Defaults to default.