Chip
Chips help users quickly recognize an important information that has been entered by them, trigger actions, make selections, or filter content.
Parameters
one of ChipStyles that defines chips background and border.
when provided will add the closing indicator and make it clickable. note that adding it will require onCloseLabel to be provided as well.
semantic / accessibility label for the onClose action. It should describe to the user what will happen if onClose is tapped.
The ChipIntent colors that will be used for the content and background of this chip in different states.
called when this chip is clicked
the Modifier to be applied to this chip
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.
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.
a Composable to set as the chip's custom content.
Chips help users quickly recognize an important information that has been entered by them, trigger actions, make selections, or filter content.
Parameters
called when this chip is clicked
label for this chip, set null
if no label is needed
the Modifier to be applied to this chip
when provided will add the closing indicator and make it clickable. note that adding it will require onCloseLabel to be provided as well.
semantic / accessibility label for the onClose action. It should describe to the user what will happen if onClose is tapped.
The ChipIntent colors that will be used for the content and background of this chip in different states.
one of ChipStyles that defines chips background and border.
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.
optional icon at the start of the chip, preceding the text
text used by accessibility services to describe what this icon represents. This should always be provided unless this icon is used for decorative purposes, and does not represent a meaningful action that a user can take. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar.
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.