← Back to Tv Material
SuggestionChip
Overview
Code Examples
Video
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
@param onClick called when this chip is clicked @param modifier the Modifier to be applied to this chip @param enabled 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 @param onLongClick callback to be called when the surface is long clicked (long-pressed) @param shape Defines the Chip's shape @param colors Color to be used on background and content of the chip @param scale Defines size of the chip relative to its original size @param border Defines a border around the chip @param glow Shadow to be shown behind the chip @param interactionSource the MutableInteractionSource representing the stream of Interactions for this chip. You can create and pass in your own remember
ed instance to observe Interactions and customize the appearance / behavior of this chip in different states @param content content for this chip, ideally a Text composable
Overloads
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 = remember { MutableInteractionSource() },
content: @Composable () -> Unit
)
Parameters
Name | Description |
---|---|
onClick | called when this chip is clicked |
modifier | the Modifier to be applied to this chip |
enabled | 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 | callback to be called when the surface is long clicked (long-pressed) |
shape | Defines the Chip's shape |
colors | Color to be used on background and content of the chip |
scale | Defines size of the chip relative to its original size |
border | Defines a border around the chip |
glow | Shadow to be shown behind the chip |
interactionSource | the MutableInteractionSource representing the stream of Interactions for this chip. You can create and pass in your own remember ed instance to observe Interactions and customize the appearance / behavior of this chip in different states |
content | content for this chip, ideally a Text composabl |