AssistChipDefaults
@ExperimentalTvMaterial3Api
object AssistChipDefaults
Contains the default values used by AssistChip
Summary
Public functions |
|
|---|---|
ClickableChipBorder |
@ComposableCreates a |
ClickableChipColors |
@ComposableCreates a |
ClickableChipGlow |
Creates a |
ClickableChipScale |
scale(Creates a |
ClickableChipShape |
shape(Creates a |
Public properties |
|
|---|---|
Dp |
The height applied to an assist chip. |
RoundedCornerShape |
The default |
Dp |
The size of an Assist chip icon |
Public functions
border
@Composable
fun border(
border: Border = Border( border = BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.border), shape = ContainerShape ),
focusedBorder: Border = Border.None,
pressedBorder: Border = focusedBorder,
disabledBorder: Border = Border( border = BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.surfaceVariant), shape = ContainerShape ),
focusedDisabledBorder: Border = border
): ClickableChipBorder
Creates a ClickableChipBorder that represents the default Borders applied on an AssistChip in different Interaction states.
| Parameters | |
|---|---|
border: Border = Border(
border = BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.border),
shape = ContainerShape
) |
the |
focusedBorder: Border = Border.None |
the |
pressedBorder: Border = focusedBorder |
the |
disabledBorder: Border = Border(
border =
BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.surfaceVariant),
shape = ContainerShape
) |
the |
focusedDisabledBorder: Border = border |
the |
colors
@Composable
fun colors(
containerColor: Color = Color.Transparent,
contentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant,
focusedContainerColor: Color = MaterialTheme.colorScheme.onSurface,
focusedContentColor: Color = MaterialTheme.colorScheme.inverseOnSurface,
pressedContainerColor: Color = MaterialTheme.colorScheme.onSurfaceVariant,
pressedContentColor: Color = MaterialTheme.colorScheme.surface,
disabledContainerColor: Color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = DisabledBackgroundColorOpacity),
disabledContentColor: Color = MaterialTheme.colorScheme.border.copy(alpha = DisabledContentColorOpacity)
): ClickableChipColors
Creates a ClickableChipColors that represents the default container and content colors used in an AssistChip
| Parameters | |
|---|---|
containerColor: Color = Color.Transparent |
the container color of this Chip when enabled |
contentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant |
the content color of this Chip when enabled |
focusedContainerColor: Color = MaterialTheme.colorScheme.onSurface |
the container color of this Chip when enabled and focused |
focusedContentColor: Color = MaterialTheme.colorScheme.inverseOnSurface |
the content color of this Chip when enabled and focused |
pressedContainerColor: Color = MaterialTheme.colorScheme.onSurfaceVariant |
the container color of this Chip when enabled and pressed |
pressedContentColor: Color = MaterialTheme.colorScheme.surface |
the content color of this Chip when enabled and pressed |
disabledContainerColor: Color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = DisabledBackgroundColorOpacity) |
the container color of this Chip when not enabled |
disabledContentColor: Color = MaterialTheme.colorScheme.border.copy(alpha = DisabledContentColorOpacity) |
the content color of this Chip when not enabled |
glow
fun glow(glow: Glow = Glow.None, focusedGlow: Glow = glow, pressedGlow: Glow = glow): ClickableChipGlow
Creates a ClickableChipGlow that represents the default Glows used in an AssistChip
scale
fun scale(
scale: @FloatRange(from = 0.0) Float = 1.0f,
focusedScale: @FloatRange(from = 0.0) Float = 1.1f,
pressedScale: @FloatRange(from = 0.0) Float = scale,
disabledScale: @FloatRange(from = 0.0) Float = scale,
focusedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale
): ClickableChipScale
Creates a ClickableChipScale that represents the default scaleFactors used in an AssistChip. scaleFactors are used to modify the size of a composable in different Interaction states e.g. 1f (original) in default state, 1.2f (scaled up) in focused state, 0.8f (scaled down) in pressed state, etc
| Parameters | |
|---|---|
scale: @FloatRange(from = 0.0) Float = 1.0f |
the scaleFactor to be used for this Chip when enabled |
focusedScale: @FloatRange(from = 0.0) Float = 1.1f |
the scaleFactor to be used for this Chip when focused |
pressedScale: @FloatRange(from = 0.0) Float = scale |
the scaleFactor to be used for this Chip when pressed |
disabledScale: @FloatRange(from = 0.0) Float = scale |
the scaleFactor to be used for this Chip when disabled |
focusedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale |
the scaleFactor to be used for this Chip when disabled and focused |
shape
fun shape(
shape: Shape = ContainerShape,
focusedShape: Shape = shape,
pressedShape: Shape = shape,
disabledShape: Shape = shape,
focusedDisabledShape: Shape = disabledShape
): ClickableChipShape
Creates a ClickableChipShape that represents the default container shapes used in an AssistChip
| Parameters | |
|---|---|
shape: Shape = ContainerShape |
the shape used when the Chip is enabled, and has no other |
focusedShape: Shape = shape |
the shape used when the Chip is enabled and focused |
pressedShape: Shape = shape |
the shape used when the Chip is enabled pressed |
disabledShape: Shape = shape |
the shape used when the Chip is not enabled |
focusedDisabledShape: Shape = disabledShape |
the shape used when the Chip is not enabled and focused |
Public properties
ContainerHeight
val ContainerHeight: Dp
The height applied to an assist chip. Note that you can override it by applying Modifier.height directly on a chip.
ContainerShape
val ContainerShape: RoundedCornerShape
The default Shape applied to an assist chip