androidx.compose.material3
InputChipDefaults
Object
No hand-written docs yet.
Contains the baseline values used by an InputChip.
object InputChipDefaults
Properties
Height
val Height: Dp
The height applied for an input chip. Note that you can override it by applying Modifier.height directly on a chip.
IconSize
val IconSize: Dp
The size of an input chip icon.
AvatarSize
val AvatarSize: Dp
The size of an input chip avatar.
HorizontalSpacingSince 1.11
val HorizontalSpacing: Dp
Default spacing between elements in an input chip.
CompactHorizontalSpacingSince 1.12
val CompactHorizontalSpacing: Dp
The compact horizontal spacing between the icon and label of an input chip.
shape
@Composable val shape: Shape
Default shape of an input chip.
Functions
horizontalArrangementSince 1.11
fun horizontalArrangement(): Arrangement.Horizontal
Returns the default arrangement of the icons/avatar and label within an input chip.
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.
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.
contentPaddingSince 1.11
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
@Composable
fun inputChipColors(): SelectableChipColors
Creates a SelectableChipColors that represents the default container, label, and icon colors used in an InputChip.
tonalInputChipColorsSince 1.12
@Composable
fun tonalInputChipColors(): SelectableChipColors
Creates a SelectableChipColors that represents the default container and content colors used in a tonal InputChip.
@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.
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.
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.
shapesSince 1.12
@Composable
fun shapes(): ChipShapes
Creates a ChipShapes that represents the default shape, pressed shape, and selected shape used in a chip.
@Composable
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.
Library docs
Contains the baseline values used by an InputChip.