Start native apps faster with the Composables CLI ->
Object

InputChipDefaults

Contains the baseline values used by an InputChip.

Source set: Common
public object InputChipDefaults

Contains the baseline values used by an InputChip.

Properties

Height

Source set: Common
public val Height: Dp = InputChipTokens.ContainerHeight

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

IconSize

Source set: Common
public val IconSize: Dp = InputChipTokens.LeadingIconSize

The size of an input chip icon.

AvatarSize

Source set: Common
public val AvatarSize: Dp = InputChipTokens.AvatarSize

The size of an input chip avatar.

HorizontalSpacing

Source set: Common
public val HorizontalSpacing: Dp = 8.dp

Default spacing between elements in an input chip.

CompactHorizontalSpacing

Source set: Common
public val CompactHorizontalSpacing: Dp = 4.dp

The compact horizontal spacing between the icon and label of an input chip.

shape

Source set: Common
public val shape: Shape

Default shape of an input chip.

Functions

horizontalArrangement

Source set: Common
public fun horizontalArrangement(): Arrangement.Horizontal

Returns the default arrangement of the icons/avatar and label within an input chip.

horizontalArrangement

Source set: Common
public fun horizontalArrangement(
        hasAvatar: Boolean,
        hasLeadingIcon: Boolean,
        hasTrailingIcon: Boolean,
    ): Arrangement.Horizontal

Returns the default arrangement of the icons/avatar and label within a compact input chip.

horizontalArrangement

Source set: Common
public fun horizontalArrangement(spacing: Dp): Arrangement.Horizontal

Creates an Arrangement.Horizontal that represents the default arrangement of the icons/avatar and label within an input chip.

Parameters

spacing the spacing between the icon and label

contentPadding

Source set: Common
public fun contentPadding(
        hasAvatar: Boolean,
        hasLeadingIcon: Boolean,
        hasTrailingIcon: Boolean,
    ): PaddingValues

Returns the padding around the content of this chip, including the leadingIcon/avatar, label, and trailingIcon.

inputChipColors

Source set: Common
@Composable
    public fun inputChipColors(): SelectableChipColors

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

tonalInputChipColors

Source set: Common
@Composable
    public fun tonalInputChipColors(): SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a tonal InputChip.

inputChipColors

Source set: Common
@Composable
    public 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 the container color of this chip when enabled
labelColor the label color of this chip when enabled
leadingIconColor the color of this chip's start icon when enabled
trailingIconColor the color of this chip's start end icon when enabled
disabledContainerColor the container color of this chip when not enabled
disabledLabelColor the label color of this chip when not enabled
disabledLeadingIconColor the color of this chip's start icon when not enabled
disabledTrailingIconColor the color of this chip's end icon when not enabled
selectedContainerColor the container color of this chip when selected
disabledSelectedContainerColor the container color of this chip when not enabled and selected
selectedLabelColor the label color of this chip when selected
selectedLeadingIconColor the color of this chip's start icon when selected
selectedTrailingIconColor the color of this chip's end icon when selected

inputChipElevation

Source set: Common
@Composable
    public 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 the elevation used when the FilterChip 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

inputChipBorder

Source set: Common
@Composable
    public 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

selected whether this chip is selected or not
enabled 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.
borderColor the border color of this chip when enabled and not selected
selectedBorderColor the border color of this chip when enabled and selected
disabledBorderColor the border color of this chip when not enabled and not selected
disabledSelectedBorderColor the border color of this chip when not enabled but selected
borderWidth the border stroke width of this chip when not selected
selectedBorderWidth the border stroke width of this chip when selected

shapes

Source set: Common
@Composable public fun shapes(): ChipShapes

Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a chip.

shapes

Source set: Common
@Composable
    public fun shapes(
        shape: Shape? = null,
        selectedShape: Shape? = null,
        pressedShape: Shape? = null,
    ): ChipShapes

Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in an InputChip and its variants.

Parameters

shape the unchecked shape for ChipShapes
selectedShape the unchecked shape for ChipShapes
pressedShape the pressed shape for ChipShapes