androidx.compose.material3
AssistChip
Composable function
Chips are small, compact elements. There are four types, each for a different job:
AssistChip: a quick action related to the content, like "Add to calendar".FilterChip: turns a filter on or off. Can be selected.InputChip: an item the user entered, like a person in a "To" field. Can be selected and removed.SuggestionChip: a suggested reply or search.

Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
AssistChip(onClick = {}, label = { Text("Assist") })
FilterChip(selected = true, onClick = {}, label = { Text("Filter") })
InputChip(selected = false, onClick = {}, label = { Text("Input") })
SuggestionChip(onClick = {}, label = { Text("Suggestion") })
}
Assist, filter and suggestion chips also come in an elevated version with a shadow, for chips on top of images or busy backgrounds.
Parameters
@Composable
fun AssistChip(
onClick: () -> Unit,
label: @Composable () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
leadingIcon: @Composable (() -> Unit)? = null,
trailingIcon: @Composable (() -> Unit)? = null,
shape: Shape = AssistChipDefaults.shape,
colors: ChipColors = AssistChipDefaults.assistChipColors(),
elevation: ChipElevation? = AssistChipDefaults.assistChipElevation(),
border: BorderStroke? = AssistChipDefaults.assistChipBorder(enabled),
horizontalArrangement: Arrangement.Horizontal = AssistChipDefaults.horizontalArrangement(),
contentPadding: PaddingValues = AssistChipDefaults.ContentPadding,
interactionSource: MutableInteractionSource? = null,
)
onClick: () -> UnitRequired
onClick: () -> UnitRequiredCalled when the chip is clicked. For a filter chip, flip your state here.
label: @Composable () -> UnitRequired
label: @Composable () -> UnitRequiredThe text of the chip. Usually one short Text.
modifier: ModifierOptional
modifier: ModifierOptionalDefault: Modifier
Changes size, padding, or position of the chip. See the Modifier guide.
enabled: BooleanOptional
enabled: BooleanOptionalDefault: true
Set to false to make the chip gray and not clickable.

AssistChip(onClick = {}, label = { Text("Not available") }, enabled = false)
leadingIcon: @Composable (() -> Unit)?Optional
leadingIcon: @Composable (() -> Unit)?OptionalDefault: null
An icon before the label. Size it with IconSize from the chip's defaults object, for example AssistChipDefaults.IconSize.
A filter chip often shows a checkmark here only while selected.

AssistChip(
onClick = {},
label = { Text("Add to calendar") },
leadingIcon = {
Icon(Icons.Filled.DateRange, contentDescription = null, Modifier.size(AssistChipDefaults.IconSize))
},
)
trailingIcon: @Composable (() -> Unit)?Optional
trailingIcon: @Composable (() -> Unit)?OptionalDefault: null
An icon after the label. On input chips, usually a close icon to remove the item.
shape: ShapeOptional
shape: ShapeOptionalDefault: AssistChipDefaults.shape
Sets the outline. Default: the theme's small shape (8 dp corners).
See the Shapes guide.
colors: ChipColorsOptional
colors: ChipColorsOptionalDefault: AssistChipDefaults.assistChipColors()
Sets the container, label and icon colors.
Make one with the chip's defaults object, for example FilterChipDefaults.filterChipColors.
elevation: ChipElevation?Optional
elevation: ChipElevation?OptionalDefault: AssistChipDefaults.assistChipElevation()
Sets the shadow height. Default: flat. Use the elevated… functions in the defaults object for a raised chip.
border: BorderStroke?Optional
border: BorderStroke?OptionalDefault: AssistChipDefaults.assistChipBorder(enabled)
Draws an outline. Unselected chips have one by default. Selected filter chips do not.
horizontalArrangement: Arrangement.HorizontalOptionalSince 1.11
horizontalArrangement: Arrangement.HorizontalOptionalSince 1.11Default: AssistChipDefaults.horizontalArrangement()
Space between the icons and the label.
contentPadding: PaddingValuesOptionalSince 1.11
contentPadding: PaddingValuesOptionalSince 1.11Default: AssistChipDefaults.ContentPadding
Space between the edge of the chip and its content.
interactionSource: MutableInteractionSource?Optional
interactionSource: MutableInteractionSource?OptionalDefault: null
Lets you observe or control press, hover and focus states. Leave it null unless your code must react to them. See InteractionSource.
Chip types
AssistChipFilterChipInputChipSuggestionChipElevatedAssistChipElevatedFilterChipElevatedSuggestionChip
See also
AssistChipDefaults: default values and helper functions forAssistChip.