androidx.compose.material3
FilterChipDefaults
Object
No hand-written docs yet.
Contains the baseline values used by FilterChip.
object FilterChipDefaults
Properties
Height
val Height: Dp
The height applied for a filter chip. Note that you can override it by applying Modifier.height directly on a chip.
IconSize
val IconSize: Dp
The size of a filter chip leading icon.
HorizontalSpacingSince 1.11
val HorizontalSpacing: Dp
The spacing between the icon and label of a filter chip.
CompactHorizontalSpacingSince 1.12
val CompactHorizontalSpacing: Dp
The compact horizontal spacing between the icon and label of a filter chip.
ContentPaddingSince 1.11
val ContentPadding: PaddingValues
The padding around the content of this chip, including the leadingIcon, label, and trailingIcon
shape
@Composable val shape: Shape
Default shape of a filter chip.
Functions
horizontalArrangementSince 1.11
fun horizontalArrangement(): Arrangement.Horizontal
Returns the default arrangement of the icons and label within a filter chip.
fun horizontalArrangement(hasLeadingIcon: Boolean, hasTrailingIcon: Boolean): Arrangement.Horizontal
Returns the default arrangement of the icons and label within a compact filter chip.
fun horizontalArrangement(spacing: Dp): Arrangement.Horizontal
Creates an Arrangement.Horizontal that represents the default arrangement of the icons and label within a filter chip.
filterChipColors
@Composable
fun filterChipColors(): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.
tonalFilterChipColorsSince 1.12
@Composable
fun tonalFilterChipColors(): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in a tonal FilterChip.
@Composable
fun filterChipColors(
containerColor: Color = Color.Unspecified,
labelColor: Color = Color.Unspecified,
iconColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledLabelColor: Color = Color.Unspecified,
disabledLeadingIconColor: Color = Color.Unspecified,
disabledTrailingIconColor: Color = Color.Unspecified,
selectedContainerColor: Color = Color.Unspecified,
disabledSelectedContainerColor: Color = Color.Unspecified,
selectedLabelColor: Color = Color.Unspecified,
selectedLeadingIconColor: Color = Color.Unspecified,
selectedTrailingIconColor: Color = Color.Unspecified,
): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.
filterChipElevation
@Composable
fun filterChipElevation(
elevation: Dp = FilterChipTokens.FlatContainerElevation,
pressedElevation: Dp = FilterChipTokens.FlatSelectedPressedContainerElevation,
focusedElevation: Dp = FilterChipTokens.FlatSelectedFocusContainerElevation,
hoveredElevation: Dp = FilterChipTokens.FlatSelectedHoverContainerElevation,
draggedElevation: Dp = FilterChipTokens.DraggedContainerElevation,
disabledElevation: Dp = elevation,
): SelectableChipElevation
Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for a flat FilterChip.
filterChipBorder
@Composable
fun filterChipBorder(
enabled: Boolean,
selected: Boolean,
borderColor: Color = FilterChipTokens.FlatUnselectedOutlineColor.value,
selectedBorderColor: Color = Color.Transparent,
disabledBorderColor: Color = FilterChipTokens.FlatDisabledUnselectedOutlineColor.value.copy(alpha = FilterChipTokens.FlatDisabledUnselectedOutlineOpacity),
disabledSelectedBorderColor: Color = Color.Transparent,
borderWidth: Dp = FilterChipTokens.FlatUnselectedOutlineWidth,
selectedBorderWidth: Dp = FilterChipTokens.FlatSelectedOutlineWidth,
): BorderStroke
Creates a BorderStroke that represents the default border used in a flat FilterChip.
elevatedFilterChipColors
@Composable
fun elevatedFilterChipColors(): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.
tonalElevatedFilterChipColorsSince 1.12
@Composable
fun tonalElevatedFilterChipColors(): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in an elevated, tonal FilterChip.
@Composable
fun elevatedFilterChipColors(
containerColor: Color = Color.Unspecified,
labelColor: Color = Color.Unspecified,
iconColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledLabelColor: Color = Color.Unspecified,
disabledLeadingIconColor: Color = Color.Unspecified,
disabledTrailingIconColor: Color = Color.Unspecified,
selectedContainerColor: Color = Color.Unspecified,
disabledSelectedContainerColor: Color = Color.Unspecified,
selectedLabelColor: Color = Color.Unspecified,
selectedLeadingIconColor: Color = Color.Unspecified,
selectedTrailingIconColor: Color = Color.Unspecified,
): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.
elevatedFilterChipElevation
@Composable
fun elevatedFilterChipElevation(
elevation: Dp = FilterChipTokens.ElevatedContainerElevation,
pressedElevation: Dp = FilterChipTokens.ElevatedPressedContainerElevation,
focusedElevation: Dp = FilterChipTokens.ElevatedFocusContainerElevation,
hoveredElevation: Dp = FilterChipTokens.ElevatedHoverContainerElevation,
draggedElevation: Dp = FilterChipTokens.DraggedContainerElevation,
disabledElevation: Dp = FilterChipTokens.ElevatedDisabledContainerElevation,
): SelectableChipElevation
Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for an elevated FilterChip.
shapesSince 1.12
@Composable
fun shapes(): ChipShapes
Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a chip.
@Composable
fun shapes(
shape: Shape? = null,
selectedShape: Shape? = null,
pressedShape: Shape? = null,
): ChipShapes
Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a FilterChip and its variants.
Library docs
Contains the baseline values used by FilterChip.