androidx.compose.material3
ElevatedFilterChip
Composable function
One of the chip types. It works like AssistChip. Only the parameters that differ are described here.
A FilterChip with a fill and a shadow instead of an outline.

var selected by remember { mutableStateOf(true) }
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
ElevatedFilterChip(
selected = selected,
onClick = { selected = !selected },
label = { Text("Open now") },
leadingIcon = if (selected) {
{ Icon(Icons.Filled.Done, null, Modifier.size(FilterChipDefaults.IconSize)) }
} else null,
)
ElevatedFilterChip(selected = false, onClick = {}, label = { Text("Top rated") })
}
Basic
Takes one shape.
@Composable
fun ElevatedFilterChip(
selected: Boolean,
onClick: () -> Unit,
label: @Composable () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
leadingIcon: @Composable (() -> Unit)? = null,
trailingIcon: @Composable (() -> Unit)? = null,
shape: Shape = FilterChipDefaults.shape,
colors: SelectableChipColors = FilterChipDefaults.elevatedFilterChipColors(),
elevation: SelectableChipElevation? = FilterChipDefaults.elevatedFilterChipElevation(),
border: BorderStroke? = null,
horizontalArrangement: Arrangement.Horizontal = FilterChipDefaults.horizontalArrangement(),
contentPadding: PaddingValues = FilterChipDefaults.ContentPadding,
interactionSource: MutableInteractionSource? = null,
)
selected: BooleanRequired
selected: BooleanRequiredWhether the chip is selected. Only on FilterChip and InputChip. You keep this state yourself.

var vegan by remember { mutableStateOf(true) }
var spicy by remember { mutableStateOf(false) }
Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) {
FilterChip(
selected = vegan,
onClick = { vegan = !vegan },
label = { Text("Vegan") },
leadingIcon = if (vegan) {
{ Icon(Icons.Filled.Done, null, Modifier.size(FilterChipDefaults.IconSize)) }
} else null,
)
FilterChip(selected = spicy, onClick = { spicy = !spicy }, label = { Text("Spicy") })
}
colors: SelectableChipColorsOptional
colors: SelectableChipColorsOptionalDefault: FilterChipDefaults.elevatedFilterChipColors()
Sets the container, label and icon colors.
Make one with the chip's defaults object, for example FilterChipDefaults.filterChipColors.
elevation: SelectableChipElevation?Optional
elevation: SelectableChipElevation?OptionalDefault: FilterChipDefaults.elevatedFilterChipElevation()
Sets the shadow height. Default: flat. Use the elevated… functions in the defaults object for a raised chip.
Defaults that differ from AssistChip:
shape=FilterChipDefaults.shapeborder=nullhorizontalArrangement=FilterChipDefaults.horizontalArrangement()contentPadding=FilterChipDefaults.ContentPadding
Same as in AssistChip: onClick, label, modifier, enabled, leadingIcon, trailingIcon, shape, border, horizontalArrangement, contentPadding, interactionSource.
Expressive
Takes shapes: separate shapes for rest, selected and pressed.
@Composable
fun ElevatedFilterChip(
selected: Boolean,
onClick: () -> Unit,
label: @Composable () -> Unit,
shapes: ChipShapes,
modifier: Modifier = Modifier,
enabled: Boolean = true,
leadingIcon: @Composable (() -> Unit)? = null,
trailingIcon: @Composable (() -> Unit)? = null,
colors: SelectableChipColors = FilterChipDefaults.tonalElevatedFilterChipColors(),
elevation: SelectableChipElevation? = FilterChipDefaults.elevatedFilterChipElevation(),
border: BorderStroke? = null,
horizontalArrangement: Arrangement.Horizontal = FilterChipDefaults.horizontalArrangement(leadingIcon != null, trailingIcon != null),
contentPadding: PaddingValues = FilterChipDefaults.ContentPadding,
interactionSource: MutableInteractionSource? = null,
)
shapes: ChipShapesRequiredSince 1.12
shapes: ChipShapesRequiredSince 1.12Sets shapes for rest, selected and pressed. Takes a ChipShapes.
Defaults that differ from AssistChip:
border=nullhorizontalArrangement=FilterChipDefaults.horizontalArrangement(leadingIcon != null, trailingIcon != null)contentPadding=FilterChipDefaults.ContentPadding
Same as above: selected, colors, elevation.
Same as in AssistChip: onClick, label, modifier, enabled, leadingIcon, trailingIcon, border, horizontalArrangement, contentPadding, interactionSource.
Chip types
AssistChipFilterChipInputChipSuggestionChipElevatedAssistChipElevatedFilterChipElevatedSuggestionChip
See also
AssistChipDefaults: default values and helper functions forElevatedFilterChip.