{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

AssistChipDefaults

public static class AssistChipDefaults


Contains the baseline values used by AssistChip.

Summary

Public fields

static @NonNull AssistChipDefaults

Public methods

final @NonNull ChipBorder
@Composable
assistChipBorder(
    @NonNull Color borderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Dp borderWidth
)

This method is deprecated. Maintained for binary compatibility.

final @NonNull BorderStroke
@Composable
assistChipBorder(
    boolean enabled,
    @NonNull Color borderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Dp borderWidth
)

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

final @NonNull ChipColors

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

final @NonNull ChipColors
@Composable
assistChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color leadingIconContentColor,
    @NonNull Color trailingIconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconContentColor,
    @NonNull Color disabledTrailingIconContentColor
)

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

final @NonNull ChipElevation
@Composable
assistChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

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

final @NonNull ChipColors

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

final @NonNull ChipColors
@Composable
elevatedAssistChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color leadingIconContentColor,
    @NonNull Color trailingIconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconContentColor,
    @NonNull Color disabledTrailingIconContentColor
)

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

final @NonNull ChipElevation
@Composable
elevatedAssistChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

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

final @NonNull Dp

The height applied for an assist chip.

final @NonNull Dp

The size of an assist chip icon.

final @NonNull Shape

Default shape of an assist chip.

Public fields

INSTANCE

public static @NonNull AssistChipDefaults INSTANCE

Public methods

assistChipBorder

@Composable
public final @NonNull ChipBorder assistChipBorder(
    @NonNull Color borderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Dp borderWidth
)

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

Parameters
@NonNull Color borderColor

the border color of this chip when enabled

@NonNull Color disabledBorderColor

the border color of this chip when not enabled

@NonNull Dp borderWidth

the border stroke width of this chip

assistChipBorder

@Composable
public final @NonNull BorderStroke assistChipBorder(
    boolean enabled,
    @NonNull Color borderColor,
    @NonNull Color disabledBorderColor,
    @NonNull Dp borderWidth
)

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

Parameters
boolean enabled

whether the chip is enabled

@NonNull Color borderColor

the border color of this chip when enabled

@NonNull Color disabledBorderColor

the border color of this chip when not enabled

@NonNull Dp borderWidth

the border stroke width of this chip

assistChipColors

@Composable
public final @NonNull ChipColors assistChipColors()

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

assistChipColors

@Composable
public final @NonNull ChipColors assistChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color leadingIconContentColor,
    @NonNull Color trailingIconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconContentColor,
    @NonNull Color disabledTrailingIconContentColor
)

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

Parameters
@NonNull Color containerColor

the container color of this chip when enabled

@NonNull Color labelColor

the label color of this chip when enabled

@NonNull Color leadingIconContentColor

the color of this chip's start icon when enabled

@NonNull Color trailingIconContentColor

the color of this chip's end icon when enabled

@NonNull Color disabledContainerColor

the container color of this chip when not enabled

@NonNull Color disabledLabelColor

the label color of this chip when not enabled

@NonNull Color disabledLeadingIconContentColor

the color of this chip's start icon when not enabled

@NonNull Color disabledTrailingIconContentColor

the color of this chip's end icon when not enabled

assistChipElevation

@Composable
public final @NonNull ChipElevation assistChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

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

Parameters
@NonNull Dp elevation

the elevation used when the AssistChip is has no other Interactions

@NonNull Dp pressedElevation

the elevation used when the chip is pressed.

@NonNull Dp focusedElevation

the elevation used when the chip is focused

@NonNull Dp hoveredElevation

the elevation used when the chip is hovered

@NonNull Dp draggedElevation

the elevation used when the chip is dragged

@NonNull Dp disabledElevation

the elevation used when the chip is not enabled

elevatedAssistChipColors

@Composable
public final @NonNull ChipColors elevatedAssistChipColors()

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

elevatedAssistChipColors

@Composable
public final @NonNull ChipColors elevatedAssistChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color leadingIconContentColor,
    @NonNull Color trailingIconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledLeadingIconContentColor,
    @NonNull Color disabledTrailingIconContentColor
)

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

Parameters
@NonNull Color containerColor

the container color of this chip when enabled

@NonNull Color labelColor

the label color of this chip when enabled

@NonNull Color leadingIconContentColor

the color of this chip's start icon when enabled

@NonNull Color trailingIconContentColor

the color of this chip's end icon when enabled

@NonNull Color disabledContainerColor

the container color of this chip when not enabled

@NonNull Color disabledLabelColor

the label color of this chip when not enabled

@NonNull Color disabledLeadingIconContentColor

the color of this chip's start icon when not enabled

@NonNull Color disabledTrailingIconContentColor

the color of this chip's end icon when not enabled

elevatedAssistChipElevation

@Composable
public final @NonNull ChipElevation elevatedAssistChipElevation(
    @NonNull Dp elevation,
    @NonNull Dp pressedElevation,
    @NonNull Dp focusedElevation,
    @NonNull Dp hoveredElevation,
    @NonNull Dp draggedElevation,
    @NonNull Dp disabledElevation
)

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

Parameters
@NonNull Dp elevation

the elevation used when the AssistChip is has no other Interactions

@NonNull Dp pressedElevation

the elevation used when the chip is pressed.

@NonNull Dp focusedElevation

the elevation used when the chip is focused

@NonNull Dp hoveredElevation

the elevation used when the chip is hovered

@NonNull Dp draggedElevation

the elevation used when the chip is dragged

@NonNull Dp disabledElevation

the elevation used when the chip is not enabled

getHeight

public final @NonNull Dp getHeight()

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

getIconSize

public final @NonNull Dp getIconSize()

The size of an assist chip icon.

getShape

@Composable
public final @NonNull Shape getShape()

Default shape of an assist chip.