AssistChipDefaults
-
Cmn
object AssistChipDefaults
Contains the baseline values used by AssistChip.
Summary
Public functions |
||
|---|---|---|
ChipBorder |
@ComposableThis function is deprecated. Maintained for binary compatibility. |
Cmn
|
BorderStroke |
@ComposableCreates a |
Cmn
|
ChipColors |
Creates a |
Cmn
|
ChipColors |
@ComposableCreates a |
Cmn
|
ChipElevation |
@ComposableCreates a |
Cmn
|
ChipColors |
Creates a |
Cmn
|
ChipColors |
@ComposableCreates a |
Cmn
|
ChipElevation |
@ComposableCreates a |
Cmn
|
Public properties |
||
|---|---|---|
Dp |
The height applied for an assist chip. |
Cmn
|
Dp |
The size of an assist chip icon. |
Cmn
|
Shape |
Default shape of an assist chip. |
Cmn
|
Public functions
assistChipBorder
@Composable
funassistChipBorder(
borderColor: Color = AssistChipTokens.FlatOutlineColor.value,
disabledBorderColor: Color = AssistChipTokens.FlatDisabledOutlineColor.value.copy( alpha = AssistChipTokens.FlatDisabledOutlineOpacity ),
borderWidth: Dp = AssistChipTokens.FlatOutlineWidth
): ChipBorder
Creates a ChipBorder that represents the default border used in a flat AssistChip.
| Parameters | |
|---|---|
borderColor: Color = AssistChipTokens.FlatOutlineColor.value |
the border color of this chip when enabled |
disabledBorderColor: Color = AssistChipTokens.FlatDisabledOutlineColor.value.copy(
alpha = AssistChipTokens.FlatDisabledOutlineOpacity
) |
the border color of this chip when not enabled |
borderWidth: Dp = AssistChipTokens.FlatOutlineWidth |
the border stroke width of this chip |
assistChipBorder
@Composable
fun assistChipBorder(
enabled: Boolean,
borderColor: Color = AssistChipTokens.FlatOutlineColor.value,
disabledBorderColor: Color = AssistChipTokens.FlatDisabledOutlineColor.value.copy( alpha = AssistChipTokens.FlatDisabledOutlineOpacity ),
borderWidth: Dp = AssistChipTokens.FlatOutlineWidth
): BorderStroke
Creates a ChipBorder that represents the default border used in a flat AssistChip.
| Parameters | |
|---|---|
enabled: Boolean |
whether the chip is enabled |
borderColor: Color = AssistChipTokens.FlatOutlineColor.value |
the border color of this chip when enabled |
disabledBorderColor: Color = AssistChipTokens.FlatDisabledOutlineColor.value.copy(
alpha = AssistChipTokens.FlatDisabledOutlineOpacity
) |
the border color of this chip when not enabled |
borderWidth: Dp = AssistChipTokens.FlatOutlineWidth |
the border stroke width of this chip |
assistChipColors
@Composable
fun assistChipColors(): ChipColors
Creates a ChipColors that represents the default container , label, and icon colors used in a flat AssistChip.
assistChipColors
@Composable
fun assistChipColors(
containerColor: Color = Color.Unspecified,
labelColor: Color = Color.Unspecified,
leadingIconContentColor: Color = Color.Unspecified,
trailingIconContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledLabelColor: Color = Color.Unspecified,
disabledLeadingIconContentColor: Color = Color.Unspecified,
disabledTrailingIconContentColor: Color = Color.Unspecified
): ChipColors
Creates a ChipColors that represents the default container , label, and icon colors used in a flat AssistChip.
| 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 |
leadingIconContentColor: Color = Color.Unspecified |
the color of this chip's start icon when enabled |
trailingIconContentColor: Color = Color.Unspecified |
the color of this chip's end icon 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 |
disabledLeadingIconContentColor: Color = Color.Unspecified |
the color of this chip's start icon when not enabled |
disabledTrailingIconContentColor: Color = Color.Unspecified |
the color of this chip's end icon when not enabled |
assistChipElevation
@Composable
fun assistChipElevation(
elevation: Dp = AssistChipTokens.FlatContainerElevation,
pressedElevation: Dp = elevation,
focusedElevation: Dp = elevation,
hoveredElevation: Dp = elevation,
draggedElevation: Dp = AssistChipTokens.DraggedContainerElevation,
disabledElevation: Dp = elevation
): ChipElevation
Creates a ChipElevation that will animate between the provided values according to the Material specification for a flat AssistChip.
| Parameters | |
|---|---|
elevation: Dp = AssistChipTokens.FlatContainerElevation |
the elevation used when the |
pressedElevation: Dp = elevation |
the elevation used when the chip is pressed. |
focusedElevation: Dp = elevation |
the elevation used when the chip is focused |
hoveredElevation: Dp = elevation |
the elevation used when the chip is hovered |
draggedElevation: Dp = AssistChipTokens.DraggedContainerElevation |
the elevation used when the chip is dragged |
disabledElevation: Dp = elevation |
the elevation used when the chip is not enabled |
elevatedAssistChipColors
@Composable
fun elevatedAssistChipColors(): ChipColors
Creates a ChipColors that represents the default container, label, and icon colors used in an elevated AssistChip.
elevatedAssistChipColors
@Composable
fun elevatedAssistChipColors(
containerColor: Color = Color.Unspecified,
labelColor: Color = Color.Unspecified,
leadingIconContentColor: Color = Color.Unspecified,
trailingIconContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledLabelColor: Color = Color.Unspecified,
disabledLeadingIconContentColor: Color = Color.Unspecified,
disabledTrailingIconContentColor: Color = Color.Unspecified
): ChipColors
Creates a ChipColors that represents the default container, label, and icon colors used in an elevated AssistChip.
| 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 |
leadingIconContentColor: Color = Color.Unspecified |
the color of this chip's start icon when enabled |
trailingIconContentColor: Color = Color.Unspecified |
the color of this chip's end icon 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 |
disabledLeadingIconContentColor: Color = Color.Unspecified |
the color of this chip's start icon when not enabled |
disabledTrailingIconContentColor: Color = Color.Unspecified |
the color of this chip's end icon when not enabled |
elevatedAssistChipElevation
@Composable
fun elevatedAssistChipElevation(
elevation: Dp = AssistChipTokens.ElevatedContainerElevation,
pressedElevation: Dp = AssistChipTokens.ElevatedPressedContainerElevation,
focusedElevation: Dp = AssistChipTokens.ElevatedFocusContainerElevation,
hoveredElevation: Dp = AssistChipTokens.ElevatedHoverContainerElevation,
draggedElevation: Dp = AssistChipTokens.DraggedContainerElevation,
disabledElevation: Dp = AssistChipTokens.ElevatedDisabledContainerElevation
): ChipElevation
Creates a ChipElevation that will animate between the provided values according to the Material specification for an elevated AssistChip.
| Parameters | |
|---|---|
elevation: Dp = AssistChipTokens.ElevatedContainerElevation |
the elevation used when the |
pressedElevation: Dp = AssistChipTokens.ElevatedPressedContainerElevation |
the elevation used when the chip is pressed. |
focusedElevation: Dp = AssistChipTokens.ElevatedFocusContainerElevation |
the elevation used when the chip is focused |
hoveredElevation: Dp = AssistChipTokens.ElevatedHoverContainerElevation |
the elevation used when the chip is hovered |
draggedElevation: Dp = AssistChipTokens.DraggedContainerElevation |
the elevation used when the chip is dragged |
disabledElevation: Dp = AssistChipTokens.ElevatedDisabledContainerElevation |
the elevation used when the chip is not enabled |