public object SuggestionChipDefaults
Contains the baseline values used by SuggestionChip.
Properties
Height
public val Height: Dp = SuggestionChipTokens.ContainerHeight
The height applied for a suggestion chip. Note that you can override it by applying Modifier.height directly on a chip.
IconSize
public val IconSize: Dp = SuggestionChipTokens.LeadingIconSize
The size of a suggestion chip icon.
ContentPadding
public val ContentPadding: PaddingValues = PaddingValues(horizontal = 8.dp)
The padding around the content of the chip, including the icon and label.
HorizontalSpacing
public val HorizontalSpacing: Dp = 8.dp
Default spacing between elements in a suggestion chip.
shape
public val shape: Shape
Default shape of a suggestion chip.
Functions
horizontalArrangement
public fun horizontalArrangement(): Arrangement.Horizontal
Returns the default arrangement of the icon and label within a suggestion chip.
horizontalArrangement
public fun horizontalArrangement(spacing: Dp): Arrangement.Horizontal
Creates an Arrangement.Horizontal that represents the default arrangement of the icon and label within a suggestion chip.
Parameters
| spacing | the spacing between the icon and label |
suggestionChipColors
@Composable
public fun suggestionChipColors(): ChipColors
Creates a ChipColors that represents the default container, label, and icon colors used in a flat SuggestionChip.
suggestionChipColors
@Composable
public fun suggestionChipColors(
containerColor: Color = Color.Unspecified,
labelColor: Color = Color.Unspecified,
iconContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledLabelColor: Color = Color.Unspecified,
disabledIconContentColor: Color = Color.Unspecified,
): ChipColors
Creates a ChipColors that represents the default container, label, and icon colors used in a flat SuggestionChip.
Parameters
| containerColor | the container color of this chip when enabled |
| labelColor | the label color of this chip when enabled |
| iconContentColor | the color of this chip's icon when enabled |
| disabledContainerColor | the container color of this chip when not enabled |
| disabledLabelColor | the label color of this chip when not enabled |
| disabledIconContentColor | the color of this chip's icon when not enabled |
suggestionChipElevation
@Composable
public fun suggestionChipElevation(
elevation: Dp = SuggestionChipTokens.FlatContainerElevation,
pressedElevation: Dp = elevation,
focusedElevation: Dp = elevation,
hoveredElevation: Dp = elevation,
draggedElevation: Dp = SuggestionChipTokens.DraggedContainerElevation,
disabledElevation: Dp = elevation,
): ChipElevation
Creates a ChipElevation that will animate between the provided values according to the Material specification for a flat SuggestionChip.
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 |
suggestionChipBorder
@Composable
public fun suggestionChipBorder(
enabled: Boolean,
borderColor: Color = SuggestionChipTokens.FlatOutlineColor.value,
disabledBorderColor: Color =
SuggestionChipTokens.FlatDisabledOutlineColor.value.copy(
alpha = SuggestionChipTokens.FlatDisabledOutlineOpacity
),
borderWidth: Dp = SuggestionChipTokens.FlatOutlineWidth,
): BorderStroke
Creates a BorderStroke that represents the default border used in a flat SuggestionChip.
Parameters
| enabled | whether the chip is enabled |
| borderColor | the border color of this chip when enabled |
| disabledBorderColor | the border color of this chip when not enabled |
| borderWidth | the border stroke width of this chip |
suggestionChipBorder
@Deprecated(
"Maintained for binary compatibility. Use the suggestChipBorder functions instead",
replaceWith =
ReplaceWith(
"suggestionChipBorder(enabled, borderColor," + " disabledBorderColor, borderWidth)"
),
level = DeprecationLevel.WARNING,
)
@Composable
public fun suggestionChipBorder(
borderColor: Color = SuggestionChipTokens.FlatOutlineColor.value,
disabledBorderColor: Color =
SuggestionChipTokens.FlatDisabledOutlineColor.value.copy(
alpha = SuggestionChipTokens.FlatDisabledOutlineOpacity
),
borderWidth: Dp = SuggestionChipTokens.FlatOutlineWidth,
): ChipBorder
Creates a ChipBorder that represents the default border used in a flat SuggestionChip.
Parameters
| borderColor | the border color of this chip when enabled |
| disabledBorderColor | the border color of this chip when not enabled |
| borderWidth | the border stroke width of this chip |
elevatedSuggestionChipColors
@Composable
public fun elevatedSuggestionChipColors(): ChipColors
Creates a ChipColors that represents the default container, label, and icon colors used in an elevated SuggestionChip.
elevatedSuggestionChipColors
@Composable
public fun elevatedSuggestionChipColors(
containerColor: Color = Color.Unspecified,
labelColor: Color = Color.Unspecified,
iconContentColor: Color = Color.Unspecified,
disabledContainerColor: Color = Color.Unspecified,
disabledLabelColor: Color = Color.Unspecified,
disabledIconContentColor: Color = Color.Unspecified,
): ChipColors
Creates a ChipColors that represents the default container, label, and icon colors used in an elevated SuggestionChip.
Parameters
| containerColor | the container color of this chip when enabled |
| labelColor | the label color of this chip when enabled |
| iconContentColor | the color of this chip's icon when enabled |
| disabledContainerColor | the container color of this chip when not enabled |
| disabledLabelColor | the label color of this chip when not enabled |
| disabledIconContentColor | the color of this chip's icon when not enabled |
elevatedSuggestionChipElevation
@Composable
public fun elevatedSuggestionChipElevation(
elevation: Dp = SuggestionChipTokens.ElevatedContainerElevation,
pressedElevation: Dp = SuggestionChipTokens.ElevatedPressedContainerElevation,
focusedElevation: Dp = SuggestionChipTokens.ElevatedFocusContainerElevation,
hoveredElevation: Dp = SuggestionChipTokens.ElevatedHoverContainerElevation,
draggedElevation: Dp = SuggestionChipTokens.DraggedContainerElevation,
disabledElevation: Dp = SuggestionChipTokens.ElevatedDisabledContainerElevation,
): ChipElevation
Creates a ChipElevation that will animate between the provided values according to the Material specification for an elevated SuggestionChip.
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 |