Start native apps faster with the Composables CLI ->
Object

FilterChipDefaults

Contains the baseline values used by FilterChip.

Source set: Common
public object FilterChipDefaults

Contains the baseline values used by FilterChip.

Properties

Height

Source set: Common
public val Height: Dp = FilterChipTokens.ContainerHeight

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

IconSize

Source set: Common
public val IconSize: Dp = FilterChipTokens.IconSize

The size of a filter chip leading icon.

HorizontalSpacing

Source set: Common
public val HorizontalSpacing: Dp = 8.dp

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

CompactHorizontalSpacing

Source set: Common
public val CompactHorizontalSpacing: Dp = 4.dp

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

ContentPadding

Source set: Common
public val ContentPadding: PaddingValues = PaddingValues(horizontal = 8.dp)

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

shape

Source set: Common
public val shape: Shape

Default shape of a filter chip.

Functions

horizontalArrangement

Source set: Common
public fun horizontalArrangement(): Arrangement.Horizontal

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

horizontalArrangement

Source set: Common
public fun horizontalArrangement(
        hasLeadingIcon: Boolean,
        hasTrailingIcon: Boolean,
    ): Arrangement.Horizontal

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

horizontalArrangement

Source set: Common
public 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 the spacing between the icon and label

filterChipColors

Source set: Common
@Composable
    public fun filterChipColors(): SelectableChipColors

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

tonalFilterChipColors

Source set: Common
@Composable
    public fun tonalFilterChipColors(): SelectableChipColors

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

filterChipColors

Source set: Common
@Composable
    public 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 the container color of this chip when enabled
labelColor the label color of this chip when enabled
iconColor the color of this chip's start and end icons when enabled
disabledContainerColor the container color of this chip when not enabled
disabledLabelColor the label color of this chip when not enabled
disabledLeadingIconColor the color of this chip's start icon when not enabled
disabledTrailingIconColor the color of this chip's end icon when not enabled
selectedContainerColor the container color of this chip when selected
disabledSelectedContainerColor the container color of this chip when not enabled and selected
selectedLabelColor the label color of this chip when selected
selectedLeadingIconColor the color of this chip's start icon when selected
selectedTrailingIconColor the color of this chip's end icon when selected

filterChipElevation

Source set: Common
@Composable
    public 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 the elevation used when the FilterChip is has no other Interactions
pressedElevation the elevation used when the chip is pressed
focusedElevation the elevation used when the chip is focused
hoveredElevation the elevation used when the chip is hovered
draggedElevation the elevation used when the chip is dragged
disabledElevation the elevation used when the chip is not enabled

filterChipBorder

Source set: Common
@Composable
    public 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

selected whether this chip is selected or not
enabled 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.
borderColor the border color of this chip when enabled and not selected
selectedBorderColor the border color of this chip when enabled and selected
disabledBorderColor the border color of this chip when not enabled and not selected
disabledSelectedBorderColor the border color of this chip when not enabled but selected
borderWidth the border stroke width of this chip when not selected
selectedBorderWidth the border stroke width of this chip when selected

elevatedFilterChipColors

Source set: Common
@Composable
    public fun elevatedFilterChipColors(): SelectableChipColors

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

tonalElevatedFilterChipColors

Source set: Common
@Composable
    public fun tonalElevatedFilterChipColors(): SelectableChipColors

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

elevatedFilterChipColors

Source set: Common
@Composable
    public 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 the container color of this chip when enabled
labelColor the label color of this chip when enabled
iconColor the color of this chip's start and end icons when enabled
disabledContainerColor the container color of this chip when not enabled
disabledLabelColor the label color of this chip when not enabled
disabledLeadingIconColor the color of this chip's start icon when not enabled
disabledTrailingIconColor the color of this chip's end icon when not enabled
selectedContainerColor the container color of this chip when selected
disabledSelectedContainerColor the container color of this chip when not enabled and selected
selectedLabelColor the label color of this chip when selected
selectedLeadingIconColor the color of this chip's start icon when selected
selectedTrailingIconColor the color of this chip's end icon when selected

elevatedFilterChipElevation

Source set: Common
@Composable
    public 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 the elevation used when the chip is has no other Interactions
pressedElevation the elevation used when the chip is pressed
focusedElevation the elevation used when the chip is focused
hoveredElevation the elevation used when the chip is hovered
draggedElevation the elevation used when the chip is dragged
disabledElevation the elevation used when the chip is not enabled

shapes

Source set: Common
@Composable public fun shapes(): ChipShapes

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

shapes

Source set: Common
@Composable
    public 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 the unchecked shape for ChipShapes
selectedShape the unchecked shape for ChipShapes
pressedShape the pressed shape for ChipShapes