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

SuggestionChipDefaults

public static class SuggestionChipDefaults


Contains the baseline values used by SuggestionChip.

Summary

Public fields

static @NonNull SuggestionChipDefaults

Public methods

final @NonNull ChipColors

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

final @NonNull ChipColors
@Composable
elevatedSuggestionChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledIconContentColor
)

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

final @NonNull ChipElevation
@Composable
elevatedSuggestionChipElevation(
    @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 SuggestionChip.

final @NonNull Dp

The height applied for a suggestion chip.

final @NonNull Dp

The size of a suggestion chip icon.

final @NonNull Shape

Default shape of a suggestion chip.

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

This method is deprecated. Maintained for binary compatibility.

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

Creates a BorderStroke that represents the default border used in a flat SuggestionChip.

final @NonNull ChipColors

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

final @NonNull ChipColors
@Composable
suggestionChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledIconContentColor
)

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

final @NonNull ChipElevation
@Composable
suggestionChipElevation(
    @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 SuggestionChip.

Public fields

INSTANCE

public static @NonNull SuggestionChipDefaults INSTANCE

Public methods

elevatedSuggestionChipColors

@Composable
public final @NonNull ChipColors elevatedSuggestionChipColors()

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

elevatedSuggestionChipColors

@Composable
public final @NonNull ChipColors elevatedSuggestionChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledIconContentColor
)

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

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 iconContentColor

the color of this chip's 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 disabledIconContentColor

the color of this chip's icon when not enabled

elevatedSuggestionChipElevation

@Composable
public final @NonNull ChipElevation elevatedSuggestionChipElevation(
    @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 SuggestionChip.

Parameters
@NonNull Dp elevation

the elevation used when the chip 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 a suggestion chip. Note that you can override it by applying Modifier.height directly on a chip.

getIconSize

public final @NonNull Dp getIconSize()

The size of a suggestion chip icon.

getShape

@Composable
public final @NonNull Shape getShape()

Default shape of a suggestion chip.

suggestionChipBorder

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

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

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

suggestionChipBorder

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

Creates a BorderStroke that represents the default border used in a flat SuggestionChip.

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

suggestionChipColors

@Composable
public final @NonNull ChipColors suggestionChipColors()

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

suggestionChipColors

@Composable
public final @NonNull ChipColors suggestionChipColors(
    @NonNull Color containerColor,
    @NonNull Color labelColor,
    @NonNull Color iconContentColor,
    @NonNull Color disabledContainerColor,
    @NonNull Color disabledLabelColor,
    @NonNull Color disabledIconContentColor
)

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

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 iconContentColor

the color of this chip's 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 disabledIconContentColor

the color of this chip's icon when not enabled

suggestionChipElevation

@Composable
public final @NonNull ChipElevation suggestionChipElevation(
    @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 SuggestionChip.

Parameters
@NonNull Dp elevation

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