InputChip

fun TileSchemaBuilderScope.InputChip(id: String = randomId(), events: EventSchemaBuilderScope.() -> Unit = {}, style: StyleSchemaBuilderScope.() -> Unit = { size( width = wrapHorizontally(), height = wrapVertically() ) }, visibility: TileSchema.Visibility = visible(), searchableTerms: List<String>? = null, text: String, selected: Boolean = false, leadingIcon: IconSchema? = null, trailingIcon: IconSchema? = null, enabled: Boolean = true)

Renders a Material 3 input chip with a toggleable selected state, text as its label and optional leadingIcon / trailingIcon. Tapping the chip flips selected locally on the client (no round trip needed for the new value to take effect), then dispatches onCheck (when it becomes selected) or onUncheck (when it becomes unselected), always followed by onCheckChanged. The trailing icon is decorative — tapping anywhere on the chip toggles it. The current selected value can be read from this tile by its id via GetData.

Parameters

id

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

events

Events owned by this tile, wired to its triggers (onCheck, onUncheck, onCheckChanged).

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.

text

Label displayed on the chip.

selected

Whether the chip starts selected. Defaults to false.

leadingIcon

Optional icon rendered before the text. Defaults to none.

trailingIcon

Optional decorative icon rendered after the text. Defaults to none.

enabled

Whether the chip is interactive. Defaults to true.