SuggestionChipDefaults


Contains the baseline values used by SuggestionChip.

Summary

Public functions

ChipColors

Creates a ChipColors that represents the default container, label, and icon colors used in an elevated SuggestionChip.

Cmn
ChipColors
@Composable
elevatedSuggestionChipColors(
    containerColor: Color,
    labelColor: Color,
    iconContentColor: Color,
    disabledContainerColor: Color,
    disabledLabelColor: Color,
    disabledIconContentColor: Color
)

Creates a ChipColors that represents the default container, label, and icon colors used in an elevated SuggestionChip.

Cmn
ChipElevation
@Composable
elevatedSuggestionChipElevation(
    elevation: Dp,
    pressedElevation: Dp,
    focusedElevation: Dp,
    hoveredElevation: Dp,
    draggedElevation: Dp,
    disabledElevation: Dp
)

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

Cmn
Arrangement.Horizontal

Returns the default arrangement of the icon and label within a suggestion chip.

Cmn
Arrangement.Horizontal

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

Cmn
ChipBorder
@Composable
suggestionChipBorder(
    borderColor: Color,
    disabledBorderColor: Color,
    borderWidth: Dp
)

This function is deprecated. Maintained for binary compatibility.

Cmn
BorderStroke
@Composable
suggestionChipBorder(
    enabled: Boolean,
    borderColor: Color,
    disabledBorderColor: Color,
    borderWidth: Dp
)

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

Cmn
ChipColors

Creates a ChipColors that represents the default container, label, and icon colors used in a flat SuggestionChip.

Cmn
ChipColors
@Composable
suggestionChipColors(
    containerColor: Color,
    labelColor: Color,
    iconContentColor: Color,
    disabledContainerColor: Color,
    disabledLabelColor: Color,
    disabledIconContentColor: Color
)

Creates a ChipColors that represents the default container, label, and icon colors used in a flat SuggestionChip.

Cmn
ChipElevation
@Composable
suggestionChipElevation(
    elevation: Dp,
    pressedElevation: Dp,
    focusedElevation: Dp,
    hoveredElevation: Dp,
    draggedElevation: Dp,
    disabledElevation: Dp
)

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

Cmn

Public properties

PaddingValues

The padding around the content of the chip, including the icon and label.

Cmn
Dp

The height applied for a suggestion chip.

Cmn
Dp

Default spacing between elements in a suggestion chip.

Cmn
Dp

The size of a suggestion chip icon.

Cmn
Shape

Default shape of a suggestion chip.

Cmn

Public functions

elevatedSuggestionChipColors

@Composable
fun elevatedSuggestionChipColors(): ChipColors

Creates a ChipColors that represents the default container, label, and icon colors used in an elevated SuggestionChip.

elevatedSuggestionChipColors

@Composable
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: Color = Color.Unspecified

the container color of this chip when enabled

labelColor: Color = Color.Unspecified

the label color of this chip when enabled

iconContentColor: Color = Color.Unspecified

the color of this chip's 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

disabledIconContentColor: Color = Color.Unspecified

the color of this chip's icon when not enabled

elevatedSuggestionChipElevation

@Composable
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: Dp = SuggestionChipTokens.ElevatedContainerElevation

the elevation used when the chip is has no other Interactions

pressedElevation: Dp = SuggestionChipTokens.ElevatedPressedContainerElevation

the elevation used when the chip is pressed

focusedElevation: Dp = SuggestionChipTokens.ElevatedFocusContainerElevation

the elevation used when the chip is focused

hoveredElevation: Dp = SuggestionChipTokens.ElevatedHoverContainerElevation

the elevation used when the chip is hovered

draggedElevation: Dp = SuggestionChipTokens.DraggedContainerElevation

the elevation used when the chip is dragged

disabledElevation: Dp = SuggestionChipTokens.ElevatedDisabledContainerElevation

the elevation used when the chip is not enabled

horizontalArrangement

fun horizontalArrangement(): Arrangement.Horizontal

Returns the default arrangement of the icon and label within a suggestion chip.

horizontalArrangement

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: Dp

the spacing between the icon and label

suggestionChipBorder

@Composable
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: Color = SuggestionChipTokens.FlatOutlineColor.value

the border color of this chip when enabled

disabledBorderColor: Color = SuggestionChipTokens.FlatDisabledOutlineColor.value.copy( alpha = SuggestionChipTokens.FlatDisabledOutlineOpacity )

the border color of this chip when not enabled

borderWidth: Dp = SuggestionChipTokens.FlatOutlineWidth

the border stroke width of this chip

suggestionChipBorder

@Composable
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: Boolean

whether the chip is enabled

borderColor: Color = SuggestionChipTokens.FlatOutlineColor.value

the border color of this chip when enabled

disabledBorderColor: Color = SuggestionChipTokens.FlatDisabledOutlineColor.value.copy( alpha = SuggestionChipTokens.FlatDisabledOutlineOpacity )

the border color of this chip when not enabled

borderWidth: Dp = SuggestionChipTokens.FlatOutlineWidth

the border stroke width of this chip

suggestionChipColors

@Composable
fun suggestionChipColors(): ChipColors

Creates a ChipColors that represents the default container, label, and icon colors used in a flat SuggestionChip.

suggestionChipColors

@Composable
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: Color = Color.Unspecified

the container color of this chip when enabled

labelColor: Color = Color.Unspecified

the label color of this chip when enabled

iconContentColor: Color = Color.Unspecified

the color of this chip's 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

disabledIconContentColor: Color = Color.Unspecified

the color of this chip's icon when not enabled

suggestionChipElevation

@Composable
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: Dp = SuggestionChipTokens.FlatContainerElevation

the elevation used when the chip is has no other Interactions

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 = SuggestionChipTokens.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 ContentPaddingPaddingValues

The padding around the content of the chip, including the icon and label.

Height

val HeightDp

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

HorizontalSpacing

val HorizontalSpacingDp

Default spacing between elements in a suggestion chip.

IconSize

val IconSizeDp

The size of a suggestion chip icon.

shape

val shapeShape

Default shape of a suggestion chip.