Object

SuggestionChipDefaults

Contains the baseline values used by SuggestionChip.

Source set: Common

Added in 1.5.0-alpha17

object SuggestionChipDefaults

Contains the baseline values used by SuggestionChip.

Properties

Height

Source set: Common

Added in 1.5.0-alpha17

val Height = 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

Added in 1.5.0-alpha17

val IconSize = SuggestionChipTokens.LeadingIconSize

The size of a suggestion chip icon.

ContentPadding

Source set: Common

Added in 1.5.0-alpha17

val ContentPadding = PaddingValues(horizontal = 8.dp)

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

HorizontalSpacing

Source set: Common

Added in 1.5.0-alpha17

val HorizontalSpacing = 8.dp

Default spacing between elements in a suggestion chip.

shape

Source set: Common

Added in 1.5.0-alpha17

val shape: Shape

Default shape of a suggestion chip.

Functions

horizontalArrangement

Added in 1.5.0-alpha17

fun horizontalArrangement(): Arrangement.Horizontal

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

horizontalArrangement

Added in 1.5.0-alpha17

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

Added in 1.5.0-alpha17

@Composable fun suggestionChipColors() = MaterialTheme.colorScheme.defaultSuggestionChipColors

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

suggestionChipColors

Added in 1.5.0-alpha17

@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 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

Added in 1.5.0-alpha17

@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 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

Added in 1.5.0-alpha17

@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 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

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@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 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

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@Composable
    fun elevatedSuggestionChipColors() =
        MaterialTheme.colorScheme.defaultElevatedSuggestionChipColors

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

elevatedSuggestionChipColors

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@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 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

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@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 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