Start native apps faster with the Composables CLI ->
Object

SuggestionChipDefaults

Contains the baseline values used by SuggestionChip.

Source set: Common
public object SuggestionChipDefaults

Contains the baseline values used by SuggestionChip.

Properties

Height

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

Source set: Common
public val IconSize: Dp = SuggestionChipTokens.LeadingIconSize

The size of a suggestion chip icon.

ContentPadding

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

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

HorizontalSpacing

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

Default spacing between elements in a suggestion chip.

shape

Source set: Common
public val shape: Shape

Default shape of a suggestion chip.

Functions

horizontalArrangement

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

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

horizontalArrangement

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

Source set: Common
@Composable
    public fun suggestionChipColors(): ChipColors

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

suggestionChipColors

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

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

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

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

Source set: Common
@Composable
    public fun elevatedSuggestionChipColors(): ChipColors

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

elevatedSuggestionChipColors

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

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