FilterChipDefaults
-
Cmn
object FilterChipDefaults
Contains the baseline values used by FilterChip.
Summary
Public functions |
||
|---|---|---|
SelectableChipColors |
Creates a |
Cmn
|
SelectableChipColors |
@ComposableCreates a |
Cmn
|
SelectableChipElevation |
@ComposableCreates a |
Cmn
|
BorderStroke |
@ComposableCreates a |
Cmn
|
SelectableChipColors |
Creates a |
Cmn
|
SelectableChipColors |
@ComposableCreates a |
Cmn
|
SelectableChipElevation |
@ComposableCreates a |
Cmn
|
Public properties |
||
|---|---|---|
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 |
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 |
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 |
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 |
Public properties
ContentPadding
val ContentPadding: PaddingValues
The padding around the content of this chip, including the leadingIcon, label, and trailingIcon
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.
HorizontalSpacing
val HorizontalSpacing: Dp
The spacing between the icon and label of a filter chip.