Object

AssistChipDefaults

Contains the baseline values used by AssistChip.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Common
object AssistChipDefaults

Contains the baseline values used by AssistChip.

Properties

Common
val Height = AssistChipTokens.ContainerHeight

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

Common
val IconSize = AssistChipTokens.IconSize

The size of an assist chip icon.

Common
val HorizontalSpacing = 8.dp

The spacing between the icon and label of an assist chip.

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

The padding around the content of the chip, including the leadingIcon, label, and trailingIcon

Common
val shape: Shape

Default shape of an assist chip.

Functions

horizontalArrangement

fun horizontalArrangement(): Arrangement.Horizontal

Returns the default arrangement of the icon and label within an assist chip.


horizontalArrangement

fun horizontalArrangement(spacing: Dp): Arrangement.Horizontal

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

Parameters

spacing the spacing between the icon and label
@Composable fun assistChipColors() = MaterialTheme.colorScheme.defaultAssistChipColors

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


assistChipColors

@Composable
    fun assistChipColors(
        containerColor: Color = Color.Unspecified,
        labelColor: Color = Color.Unspecified,
        leadingIconContentColor: Color = Color.Unspecified,
        trailingIconContentColor: Color = Color.Unspecified,
        disabledContainerColor: Color = Color.Unspecified,
        disabledLabelColor: Color = Color.Unspecified,
        disabledLeadingIconContentColor: Color = Color.Unspecified,
        disabledTrailingIconContentColor: Color = Color.Unspecified,
    ): ChipColors

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

Parameters

containerColor the container color of this chip when enabled
labelColor the label color of this chip when enabled
leadingIconContentColor the color of this chip's start icon when enabled
trailingIconContentColor the color of this chip's end icon when enabled
disabledContainerColor the container color of this chip when not enabled
disabledLabelColor the label color of this chip when not enabled
disabledLeadingIconContentColor the color of this chip's start icon when not enabled
disabledTrailingIconContentColor the color of this chip's end icon when not enabled

assistChipElevation

@Composable
    fun assistChipElevation(
        elevation: Dp = AssistChipTokens.FlatContainerElevation,
        pressedElevation: Dp = elevation,
        focusedElevation: Dp = elevation,
        hoveredElevation: Dp = elevation,
        draggedElevation: Dp = AssistChipTokens.DraggedContainerElevation,
        disabledElevation: Dp = elevation,
    ): ChipElevation

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

Parameters

elevation the elevation used when the AssistChip 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

assistChipBorder

@Composable
    fun assistChipBorder(
        enabled: Boolean,
        borderColor: Color = AssistChipTokens.FlatOutlineColor.value,
        disabledBorderColor: Color =
            AssistChipTokens.FlatDisabledOutlineColor.value.copy(
                alpha = AssistChipTokens.FlatDisabledOutlineOpacity
            ),
        borderWidth: Dp = AssistChipTokens.FlatOutlineWidth,
    ): BorderStroke

Creates a ChipBorder that represents the default border used in a flat AssistChip.

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

assistChipBorder

@Composable
    fun assistChipBorder(
        borderColor: Color = AssistChipTokens.FlatOutlineColor.value,
        disabledBorderColor: Color =
            AssistChipTokens.FlatDisabledOutlineColor.value.copy(
                alpha = AssistChipTokens.FlatDisabledOutlineOpacity
            ),
        borderWidth: Dp = AssistChipTokens.FlatOutlineWidth,
    ): ChipBorder

Creates a ChipBorder that represents the default border used in a flat AssistChip.

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

elevatedAssistChipColors

@Composable
    fun elevatedAssistChipColors() = MaterialTheme.colorScheme.defaultElevatedAssistChipColors

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


elevatedAssistChipColors

@Composable
    fun elevatedAssistChipColors(
        containerColor: Color = Color.Unspecified,
        labelColor: Color = Color.Unspecified,
        leadingIconContentColor: Color = Color.Unspecified,
        trailingIconContentColor: Color = Color.Unspecified,
        disabledContainerColor: Color = Color.Unspecified,
        disabledLabelColor: Color = Color.Unspecified,
        disabledLeadingIconContentColor: Color = Color.Unspecified,
        disabledTrailingIconContentColor: Color = Color.Unspecified,
    ): ChipColors

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

Parameters

containerColor the container color of this chip when enabled
labelColor the label color of this chip when enabled
leadingIconContentColor the color of this chip's start icon when enabled
trailingIconContentColor the color of this chip's end icon when enabled
disabledContainerColor the container color of this chip when not enabled
disabledLabelColor the label color of this chip when not enabled
disabledLeadingIconContentColor the color of this chip's start icon when not enabled
disabledTrailingIconContentColor the color of this chip's end icon when not enabled

elevatedAssistChipElevation

@Composable
    fun elevatedAssistChipElevation(
        elevation: Dp = AssistChipTokens.ElevatedContainerElevation,
        pressedElevation: Dp = AssistChipTokens.ElevatedPressedContainerElevation,
        focusedElevation: Dp = AssistChipTokens.ElevatedFocusContainerElevation,
        hoveredElevation: Dp = AssistChipTokens.ElevatedHoverContainerElevation,
        draggedElevation: Dp = AssistChipTokens.DraggedContainerElevation,
        disabledElevation: Dp = AssistChipTokens.ElevatedDisabledContainerElevation,
    ): ChipElevation

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

Parameters

elevation the elevation used when the AssistChip 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