AsyncImage

fun TileSchemaBuilderScope.AsyncImage(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, model: AsyncImageTileSchema.Model, contentDescription: String? = null, contentScale: AsyncImageTileSchema.ContentScale = fitContentScale(), alpha: Float = 1.0f, clipToBounds: Boolean = true, alignment: AlignmentSchema.TwoDimensional = alignToCenter())

Renders a Coil AsyncImage that loads its content from model — a remote URL (urlImageModel), raw bytes (arrayOfBytesImageModel) or a base64 string (base64ImageModel, decoded on the client before being handed to Coil). Dispatches onAsyncImageLoadStart / onAsyncImageLoadSuccess / onAsyncImageLoadFailure on every load state change, including reloads triggered by a model change, so they may fire more than once over the tile's lifetime. The tile is not clickable and fires no display trigger — wrap it in a Box or Card for tap handling. There is no built-in placeholder or error image: render one yourself by reacting to the load triggers.

Parameters

id

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

events

Events owned by this tile, wired to its triggers (load start, load success, load failure).

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.

contentDescription

Accessibility description of the image. Defaults to none.

contentScale

How the image is scaled to fit its bounds — cropContentScale, fitContentScale, fillHeightContentScale, fillWidthContentScale, insideContentScale or fillBoundsContentScale. Defaults to fit.

alpha

Opacity applied to the image, from 0f to 1f. Defaults to 1f.

clipToBounds

Whether the image is clipped to its layout bounds. Defaults to true.

alignment

Alignment of the image within its bounds. Defaults to center.