Object

SuggestionChipDefaults

Contains the baseline values used by SuggestionChip.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
object SuggestionChipDefaults

Contains the baseline values used by SuggestionChip.

Properties

Common
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.

Common
val IconSize = SuggestionChipTokens.LeadingIconSize

The size of a suggestion chip icon.

Common
val ContentPadding = PaddingValues(horizontal = 8.dp)

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

Common
val HorizontalSpacing = 8.dp

Default spacing between elements in a suggestion chip.

Common
val shape: Shape

Default shape of a suggestion chip.

Functions

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 the spacing between the icon and label
@Composable fun suggestionChipColors() = MaterialTheme.colorScheme.defaultSuggestionChipColors

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

@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

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

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