SuggestionChip

Composable Component

Material Design suggestion chip

Android
@ExperimentalTvMaterial3Api
@Composable
fun SuggestionChip(
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    onLongClick: (() -> Unit)? = null,
    shape: ClickableChipShape = SuggestionChipDefaults.shape(),
    colors: ClickableChipColors = SuggestionChipDefaults.colors(),
    scale: ClickableChipScale = SuggestionChipDefaults.scale(),
    border: ClickableChipBorder = SuggestionChipDefaults.border(),
    glow: ClickableChipGlow = SuggestionChipDefaults.glow(),
    interactionSource: MutableInteractionSource? = null,
    content: @Composable () -> Unit
)

Parameters

onClickcalled when this chip is clicked
modifierthe Modifier to be applied to this chip
enabledcontrols the enabled state of this chip. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services
onLongClickcallback to be called when the surface is long clicked (long-pressed)
shapeDefines the Chip's shape
colorsColor to be used on background and content of the chip
scaleDefines size of the chip relative to its original size
borderDefines a border around the chip
glowShadow to be shown behind the chip
interactionSourcean optional hoisted MutableInteractionSource for observing and emitting Interactions for this chip. You can use this to change the chip's appearance or preview the chip in different states. Note that if null is provided, interactions will still happen internally.
contentcontent for this chip, ideally a Text composable