InputChipDefaults


Contains the baseline values used by an InputChip.

Summary

Public functions

BorderStroke
@Composable
inputChipBorder(
    enabled: Boolean,
    selected: Boolean,
    borderColor: Color,
    selectedBorderColor: Color,
    disabledBorderColor: Color,
    disabledSelectedBorderColor: Color,
    borderWidth: Dp,
    selectedBorderWidth: Dp
)

Creates a BorderStroke that represents the default border used in an InputChip.

Cmn
SelectableChipColors

Creates a SelectableChipColors that represents the default container, label, and icon colors used in an InputChip.

Cmn
SelectableChipColors
@Composable
inputChipColors(
    containerColor: Color,
    labelColor: Color,
    leadingIconColor: Color,
    trailingIconColor: Color,
    disabledContainerColor: Color,
    disabledLabelColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color,
    selectedContainerColor: Color,
    disabledSelectedContainerColor: Color,
    selectedLabelColor: Color,
    selectedLeadingIconColor: Color,
    selectedTrailingIconColor: Color
)

Creates a SelectableChipColors that represents the default container, label, and icon colors used in an InputChip.

Cmn
SelectableChipElevation
@Composable
inputChipElevation(
    elevation: Dp,
    pressedElevation: Dp,
    focusedElevation: Dp,
    hoveredElevation: Dp,
    draggedElevation: Dp,
    disabledElevation: Dp
)

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for an InputChip.

Cmn

Public properties

Dp

The size of an input chip avatar.

Cmn
Dp

The height applied for an input chip.

Cmn
Dp

The size of an input chip icon.

Cmn
Shape

Default shape of an input chip.

Cmn

Public functions

inputChipBorder

@Composable
fun inputChipBorder(
    enabled: Boolean,
    selected: Boolean,
    borderColor: Color = InputChipTokens.UnselectedOutlineColor.value,
    selectedBorderColor: Color = Color.Transparent,
    disabledBorderColor: Color = InputChipTokens.DisabledUnselectedOutlineColor.value .copy(alpha = InputChipTokens.DisabledUnselectedOutlineOpacity),
    disabledSelectedBorderColor: Color = Color.Transparent,
    borderWidth: Dp = InputChipTokens.UnselectedOutlineWidth,
    selectedBorderWidth: Dp = InputChipTokens.SelectedOutlineWidth
): BorderStroke

Creates a BorderStroke that represents the default border used in an InputChip.

Parameters
enabled: Boolean

controls the enabled state of this chip. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

selected: Boolean

whether this chip is selected or not

borderColor: Color = InputChipTokens.UnselectedOutlineColor.value

the border color of this chip when enabled and not selected

selectedBorderColor: Color = Color.Transparent

the border color of this chip when enabled and selected

disabledBorderColor: Color = InputChipTokens.DisabledUnselectedOutlineColor.value .copy(alpha = InputChipTokens.DisabledUnselectedOutlineOpacity)

the border color of this chip when not enabled and not selected

disabledSelectedBorderColor: Color = Color.Transparent

the border color of this chip when not enabled but selected

borderWidth: Dp = InputChipTokens.UnselectedOutlineWidth

the border stroke width of this chip when not selected

selectedBorderWidth: Dp = InputChipTokens.SelectedOutlineWidth

the border stroke width of this chip when selected

inputChipColors

@Composable
fun inputChipColors(): SelectableChipColors

Creates a SelectableChipColors that represents the default container, label, and icon colors used in an InputChip.

inputChipColors

@Composable
fun inputChipColors(
    containerColor: Color = Color.Unspecified,
    labelColor: Color = Color.Unspecified,
    leadingIconColor: Color = Color.Unspecified,
    trailingIconColor: Color = Color.Unspecified,
    disabledContainerColor: Color = Color.Unspecified,
    disabledLabelColor: Color = Color.Unspecified,
    disabledLeadingIconColor: Color = Color.Unspecified,
    disabledTrailingIconColor: Color = Color.Unspecified,
    selectedContainerColor: Color = Color.Unspecified,
    disabledSelectedContainerColor: Color = Color.Unspecified,
    selectedLabelColor: Color = Color.Unspecified,
    selectedLeadingIconColor: Color = Color.Unspecified,
    selectedTrailingIconColor: Color = Color.Unspecified
): SelectableChipColors

Creates a SelectableChipColors that represents the default container, label, and icon colors used in an InputChip.

Parameters
containerColor: Color = Color.Unspecified

the container color of this chip when enabled

labelColor: Color = Color.Unspecified

the label color of this chip when enabled

leadingIconColor: Color = Color.Unspecified

the color of this chip's start icon when enabled

trailingIconColor: Color = Color.Unspecified

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

disabledContainerColor: Color = Color.Unspecified

the container color of this chip when not enabled

disabledLabelColor: Color = Color.Unspecified

the label color of this chip when not enabled

disabledLeadingIconColor: Color = Color.Unspecified

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

disabledTrailingIconColor: Color = Color.Unspecified

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

selectedContainerColor: Color = Color.Unspecified

the container color of this chip when selected

disabledSelectedContainerColor: Color = Color.Unspecified

the container color of this chip when not enabled and selected

selectedLabelColor: Color = Color.Unspecified

the label color of this chip when selected

selectedLeadingIconColor: Color = Color.Unspecified

the color of this chip's start icon when selected

selectedTrailingIconColor: Color = Color.Unspecified

the color of this chip's end icon when selected

inputChipElevation

@Composable
fun inputChipElevation(
    elevation: Dp = InputChipTokens.ContainerElevation,
    pressedElevation: Dp = elevation,
    focusedElevation: Dp = elevation,
    hoveredElevation: Dp = elevation,
    draggedElevation: Dp = InputChipTokens.DraggedContainerElevation,
    disabledElevation: Dp = elevation
): SelectableChipElevation

Creates a SelectableChipElevation that will animate between the provided values according to the Material specification for an InputChip.

Parameters
elevation: Dp = InputChipTokens.ContainerElevation

the elevation used when the FilterChip is has no other Interactions

pressedElevation: Dp = elevation

the elevation used when the chip is pressed

focusedElevation: Dp = elevation

the elevation used when the chip is focused

hoveredElevation: Dp = elevation

the elevation used when the chip is hovered

draggedElevation: Dp = InputChipTokens.DraggedContainerElevation

the elevation used when the chip is dragged

disabledElevation: Dp = elevation

the elevation used when the chip is not enabled

Public properties

AvatarSize

val AvatarSizeDp

The size of an input chip avatar.

Height

val HeightDp

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

IconSize

val IconSizeDp

The size of an input chip icon.

shape

val shapeShape

Default shape of an input chip.