ElevatedFilterChip
Material Design elevated filter 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.
Filter chips use tags or descriptive words to filter content. They can be a good alternative to toggle buttons or checkboxes.
This filter chip is applied with an elevated style. If you want a flat style, use the FilterChip.
Tapping on a filter chip toggles its selection state. A selection state leadingIcon can be provided (e.g. a checkmark) to be appended at the starting edge of the chip's label.
Example of an elevated FilterChip with a trailing icon:
Parameters
whether this chip is selected or not
called when this chip is clicked
text label for this chip
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.
optional icon at the end of the chip
SelectableChipColors that will be used to resolve the colors used for this chip in different states. See FilterChipDefaults.elevatedFilterChipColors.
SelectableChipElevation used to resolve the elevation for this chip in different states. This controls the size of the shadow below the chip. Additionally, when the container color is ColorScheme.surface, this controls the amount of primary color applied as an overlay. See FilterChipDefaults.filterChipElevation.
the border to draw around the container of this chip. Pass null
for no border. See FilterChipDefaults.filterChipBorder.
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.