Object

AssistChipDefaults

Contains the baseline values used by AssistChip.

Source set: Common

Added in 1.5.0-alpha17

object AssistChipDefaults

Contains the baseline values used by AssistChip.

Properties

Height

Source set: Common

Added in 1.5.0-alpha17

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.

IconSize

Source set: Common

Added in 1.5.0-alpha17

val IconSize = AssistChipTokens.IconSize

The size of an assist chip icon.

HorizontalSpacing

Source set: Common

Added in 1.5.0-alpha17

val HorizontalSpacing = 8.dp

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

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 leadingIcon, label, and trailingIcon

shape

Source set: Common

Added in 1.5.0-alpha17

val shape: Shape

Default shape of an assist chip.

Functions

horizontalArrangement

Added in 1.5.0-alpha17

fun horizontalArrangement(): Arrangement.Horizontal

Returns the default arrangement of the icon and label within an assist 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 an assist chip.

Parameters

spacing the spacing between the icon and label

assistChipColors

Added in 1.5.0-alpha17

@Composable fun assistChipColors() = MaterialTheme.colorScheme.defaultAssistChipColors

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

assistChipColors

Added in 1.5.0-alpha17

@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

Added in 1.5.0-alpha17

@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

Added in 1.5.0-alpha17

@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

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@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

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

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

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

elevatedAssistChipColors

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@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

Added in 1.5.0-alpha17

Deprecated in 1.5.0-alpha17

@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