FilterChipDefaults


Contains the baseline values used by FilterChip.

Summary

Public functions

SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

Cmn
SelectableChipColors
@Composable
elevatedFilterChipColors(
    containerColor: Color,
    labelColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledLabelColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color,
    selectedContainerColor: Color,
    disabledSelectedContainerColor: Color,
    selectedLabelColor: Color,
    selectedLeadingIconColor: Color,
    selectedTrailingIconColor: Color
)

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

Cmn
SelectableChipElevation
@Composable
elevatedFilterChipElevation(
    elevation: Dp,
    pressedElevation: Dp,
    focusedElevation: Dp,
    hoveredElevation: Dp,
    draggedElevation: Dp,
    disabledElevation: Dp
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for an elevated FilterChip.

Cmn
BorderStroke
@Composable
filterChipBorder(
    enabled: Boolean,
    selected: Boolean,
    borderColor: Color,
    selectedBorderColor: Color,
    disabledBorderColor: Color,
    disabledSelectedBorderColor: Color,
    borderWidth: Dp,
    selectedBorderWidth: Dp
)

Creates a BorderStroke that represents the default border used in a flat FilterChip.

Cmn
SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

Cmn
SelectableChipColors
@Composable
filterChipColors(
    containerColor: Color,
    labelColor: Color,
    iconColor: Color,
    disabledContainerColor: Color,
    disabledLabelColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color,
    selectedContainerColor: Color,
    disabledSelectedContainerColor: Color,
    selectedLabelColor: Color,
    selectedLeadingIconColor: Color,
    selectedTrailingIconColor: Color
)

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

Cmn
SelectableChipElevation
@Composable
filterChipElevation(
    elevation: Dp,
    pressedElevation: Dp,
    focusedElevation: Dp,
    hoveredElevation: Dp,
    draggedElevation: Dp,
    disabledElevation: Dp
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for a flat FilterChip.

Cmn
Arrangement.Horizontal

Returns the default arrangement of the icons and label within a filter chip.

Cmn
Arrangement.Horizontal

Creates an Arrangement.Horizontal that represents the default arrangement of the icons and label within a filter chip.

Cmn
Arrangement.Horizontal
horizontalArrangement(hasLeadingIcon: Boolean, hasTrailingIcon: Boolean)

Returns the default arrangement of the icons and label within a compact filter chip.

Cmn
ChipShapes

Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a chip.

Cmn
ChipShapes
@Composable
shapes(shape: Shape?, selectedShape: Shape?, pressedShape: Shape?)

Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a FilterChip and its variants.

Cmn
SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in an elevated, tonal FilterChip.

Cmn
SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a tonal FilterChip.

Cmn

Public properties

Dp

The compact horizontal spacing between the icon and label of a filter chip.

Cmn
PaddingValues

The padding around the content of this chip, including the leadingIcon, label, and trailingIcon

Cmn
Dp

The height applied for a filter chip.

Cmn
Dp

The spacing between the icon and label of a filter chip.

Cmn
Dp

The size of a filter chip leading icon.

Cmn
Shape

Default shape of a filter chip.

Cmn

Public functions

elevatedFilterChipColors

@Composable
fun elevatedFilterChipColors(): SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in an elevated FilterChip.

elevatedFilterChipColors

@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.

Parameters
containerColor: Color = Color.Unspecified

the container color of this chip when enabled

labelColor: Color = Color.Unspecified

the label color of this chip when enabled

iconColor: Color = Color.Unspecified

the color of this chip's start and end icons when enabled

disabledContainerColor: Color = Color.Unspecified

the container color of this chip when not enabled

disabledLabelColor: Color = Color.Unspecified

the label color of this chip when not enabled

disabledLeadingIconColor: Color = Color.Unspecified

the color of this chip's start icon when not enabled

disabledTrailingIconColor: Color = Color.Unspecified

the color of this chip's end icon when not enabled

selectedContainerColor: Color = Color.Unspecified

the container color of this chip when selected

disabledSelectedContainerColor: Color = Color.Unspecified

the container color of this chip when not enabled and selected

selectedLabelColor: Color = Color.Unspecified

the label color of this chip when selected

selectedLeadingIconColor: Color = Color.Unspecified

the color of this chip's start icon when selected

selectedTrailingIconColor: Color = Color.Unspecified

the color of this chip's end icon when selected

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.

Parameters
elevation: Dp = FilterChipTokens.ElevatedContainerElevation

the elevation used when the chip is has no other Interactions

pressedElevation: Dp = FilterChipTokens.ElevatedPressedContainerElevation

the elevation used when the chip is pressed

focusedElevation: Dp = FilterChipTokens.ElevatedFocusContainerElevation

the elevation used when the chip is focused

hoveredElevation: Dp = FilterChipTokens.ElevatedHoverContainerElevation

the elevation used when the chip is hovered

draggedElevation: Dp = FilterChipTokens.DraggedContainerElevation

the elevation used when the chip is dragged

disabledElevation: Dp = FilterChipTokens.ElevatedDisabledContainerElevation

the elevation used when the chip is not enabled

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.

Parameters
enabled: Boolean

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.

selected: Boolean

whether this chip is selected or not

borderColor: Color = FilterChipTokens.FlatUnselectedOutlineColor.value

the border color of this chip when enabled and not selected

selectedBorderColor: Color = Color.Transparent

the border color of this chip when enabled and selected

disabledBorderColor: Color = FilterChipTokens.FlatDisabledUnselectedOutlineColor.value.copy( alpha = FilterChipTokens.FlatDisabledUnselectedOutlineOpacity )

the border color of this chip when not enabled and not selected

disabledSelectedBorderColor: Color = Color.Transparent

the border color of this chip when not enabled but selected

borderWidth: Dp = FilterChipTokens.FlatUnselectedOutlineWidth

the border stroke width of this chip when not selected

selectedBorderWidth: Dp = FilterChipTokens.FlatSelectedOutlineWidth

the border stroke width of this chip when selected

filterChipColors

@Composable
fun filterChipColors(): SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a flat FilterChip.

filterChipColors

@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.

Parameters
containerColor: Color = Color.Unspecified

the container color of this chip when enabled

labelColor: Color = Color.Unspecified

the label color of this chip when enabled

iconColor: Color = Color.Unspecified

the color of this chip's start and end icons when enabled

disabledContainerColor: Color = Color.Unspecified

the container color of this chip when not enabled

disabledLabelColor: Color = Color.Unspecified

the label color of this chip when not enabled

disabledLeadingIconColor: Color = Color.Unspecified

the color of this chip's start icon when not enabled

disabledTrailingIconColor: Color = Color.Unspecified

the color of this chip's end icon when not enabled

selectedContainerColor: Color = Color.Unspecified

the container color of this chip when selected

disabledSelectedContainerColor: Color = Color.Unspecified

the container color of this chip when not enabled and selected

selectedLabelColor: Color = Color.Unspecified

the label color of this chip when selected

selectedLeadingIconColor: Color = Color.Unspecified

the color of this chip's start icon when selected

selectedTrailingIconColor: Color = Color.Unspecified

the color of this chip's end icon when selected

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.

Parameters
elevation: Dp = FilterChipTokens.FlatContainerElevation

the elevation used when the FilterChip is has no other Interactions

pressedElevation: Dp = FilterChipTokens.FlatSelectedPressedContainerElevation

the elevation used when the chip is pressed

focusedElevation: Dp = FilterChipTokens.FlatSelectedFocusContainerElevation

the elevation used when the chip is focused

hoveredElevation: Dp = FilterChipTokens.FlatSelectedHoverContainerElevation

the elevation used when the chip is hovered

draggedElevation: Dp = FilterChipTokens.DraggedContainerElevation

the elevation used when the chip is dragged

disabledElevation: Dp = elevation

the elevation used when the chip is not enabled

horizontalArrangement

fun horizontalArrangement(): Arrangement.Horizontal

Returns the default arrangement of the icons and label within a filter chip.

horizontalArrangement

fun horizontalArrangement(spacing: Dp): Arrangement.Horizontal

Creates an Arrangement.Horizontal that represents the default arrangement of the icons and label within a filter chip.

Parameters
spacing: Dp

the spacing between the icon and label

horizontalArrangement

fun horizontalArrangement(hasLeadingIcon: Boolean, hasTrailingIcon: Boolean): Arrangement.Horizontal

Returns the default arrangement of the icons and label within a compact filter chip.

shapes

@Composable
fun shapes(): ChipShapes

Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a chip.

shapes

@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.

Parameters
shape: Shape? = null

the unchecked shape for ChipShapes

selectedShape: Shape? = null

the unchecked shape for ChipShapes

pressedShape: Shape? = null

the pressed shape for ChipShapes

tonalElevatedFilterChipColors

@Composable
fun tonalElevatedFilterChipColors(): SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in an elevated, tonal FilterChip.

tonalFilterChipColors

@Composable
fun tonalFilterChipColors(): SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a tonal FilterChip.

Public properties

CompactHorizontalSpacing

val CompactHorizontalSpacingDp

The compact horizontal spacing between the icon and label of a filter chip.

ContentPadding

val ContentPaddingPaddingValues

The padding around the content of this chip, including the leadingIcon, label, and trailingIcon

Height

val HeightDp

The height applied for a filter chip. Note that you can override it by applying Modifier.height directly on a chip.

HorizontalSpacing

val HorizontalSpacingDp

The spacing between the icon and label of a filter chip.

IconSize

val IconSizeDp

The size of a filter chip leading icon.

shape

val shapeShape

Default shape of a filter chip.