Chip

fun Chip(text: String, isChecked: Boolean, onCheckedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, chipVariant: ChipVariant = ChipVariant.Icon(painter = null), chipAction: ChipAction = ChipAction.None, isEnabled: Boolean = true, contentDescription: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

Chips allow users to enter information, make selections, filter content, or trigger actions.

For more information visit the ODS Core Documentation

Chip Samples

If need be, the chip can be disabled: Disabled Chip Samples

Parameters

text

Text to be displayed in the chip.

isChecked

Whether the chip is checked or not.

onCheckedChange

Callback invoked when the checked state of the chip changes.

modifier

An optional Modifier to be applied to the button. Defaults to Modifier.

chipVariant

An optional ChipVariant for the chip. Defaults to ChipVariant.Icon with an empty icon.

chipAction

An optional ChipAction for the chip. Defaults to ChipAction.None.

isEnabled

Whether the chip is enabled or not. Defaults to true.

contentDescription

An optional content description for accessibility. If not provided, text will be used.

interactionSource

An optional hoisted MutableInteractionSource for observing and emitting Interactions for the button. You can use this to change the button's appearance or preview the button in different states. Defaults to a remembered MutableInteractionSource.