Badge

fun TileSchemaBuilderScope.Badge(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = {}, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, content: String? = null)

Renders a Material 3 badge. When content is non-null it is shown as the badge's text label and the badge takes its larger, pill-shaped form; when null the badge is the small empty dot. This is a standalone badge, not attached to a sibling tile — position it yourself, e.g. inside a Box aligned over the tile it decorates. Dispatches no triggers and is not clickable.

Parameters

id

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

events

Events owned by this tile. Never fired, since the badge 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.

content

Text label shown inside the badge. When null, the badge renders as a small empty dot. Defaults to none.