SuggestionChip

Functions summary

Unit
@ExperimentalTvMaterial3Api
@NonRestartableComposable
@Composable
SuggestionChip(
    onClick: () -> Unit,
    modifier: Modifier,
    enabled: Boolean,
    onLongClick: (() -> Unit)?,
    shape: ClickableChipShape,
    colors: ClickableChipColors,
    scale: ClickableChipScale,
    border: ClickableChipBorder,
    glow: ClickableChipGlow,
    interactionSource: MutableInteractionSource?,
    content: @Composable () -> Unit
)

Material Design suggestion chip

Functions

SuggestionChip

@ExperimentalTvMaterial3Api
@NonRestartableComposable
@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
): Unit

Material Design suggestion chip

Chips help people enter information, make selections, filter content, or trigger actions. Chips can show multiple interactive elements together in the same area, such as a list of selectable movie times, or a series of email contacts

Suggestion chips help narrow a user's intent by presenting dynamically generated suggestions, such as possible responses or search filters

Parameters
onClick: () -> Unit

called when this chip is clicked

modifier: Modifier = Modifier

the Modifier to be applied to this chip

enabled: Boolean = true

controls 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

onLongClick: (() -> Unit)? = null

callback to be called when the surface is long clicked (long-pressed)

shape: ClickableChipShape = SuggestionChipDefaults.shape()

Defines the Chip's shape

colors: ClickableChipColors = SuggestionChipDefaults.colors()

Color to be used on background and content of the chip

scale: ClickableChipScale = SuggestionChipDefaults.scale()

Defines size of the chip relative to its original size

border: ClickableChipBorder = SuggestionChipDefaults.border()

Defines a border around the chip

glow: ClickableChipGlow = SuggestionChipDefaults.glow()

Shadow to be shown behind the chip

interactionSource: MutableInteractionSource? = null

an 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.

content: @Composable () -> Unit

content for this chip, ideally a Text composable