AssistChipDefaults

@ExperimentalTvMaterial3Api
object AssistChipDefaults


Contains the default values used by AssistChip

Summary

Public functions

ClickableChipBorder
@Composable
border(
    border: Border,
    focusedBorder: Border,
    pressedBorder: Border,
    disabledBorder: Border,
    focusedDisabledBorder: Border
)

Creates a ClickableChipBorder that represents the default Borders applied on an AssistChip in different Interaction states.

ClickableChipColors
@Composable
colors(
    containerColor: Color,
    contentColor: Color,
    focusedContainerColor: Color,
    focusedContentColor: Color,
    pressedContainerColor: Color,
    pressedContentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color
)

Creates a ClickableChipColors that represents the default container and content colors used in an AssistChip

ClickableChipGlow
glow(glow: Glow, focusedGlow: Glow, pressedGlow: Glow)

Creates a ClickableChipGlow that represents the default Glows used in an AssistChip

ClickableChipScale
scale(
    scale: @FloatRange(from = 0.0) Float,
    focusedScale: @FloatRange(from = 0.0) Float,
    pressedScale: @FloatRange(from = 0.0) Float,
    disabledScale: @FloatRange(from = 0.0) Float,
    focusedDisabledScale: @FloatRange(from = 0.0) Float
)

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

ClickableChipShape
shape(
    shape: Shape,
    focusedShape: Shape,
    pressedShape: Shape,
    disabledShape: Shape,
    focusedDisabledShape: Shape
)

Creates a ClickableChipShape that represents the default container shapes used in an AssistChip

Public properties

Dp

The height applied to an assist chip.

RoundedCornerShape

The default Shape applied to an assist chip

Dp

The size of an Assist chip icon

Public functions

border

Added in 1.0.0
@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 Border to be used for this Chip when enabled

focusedBorder: Border = Border.None

the Border to be used for this Chip when focused

pressedBorder: Border = focusedBorder

the Border to be used for this Chip when pressed

disabledBorder: Border = Border( border = BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.surfaceVariant), shape = ContainerShape )

the Border to be used for this Chip when disabled

focusedDisabledBorder: Border = border

the Border to be used for this Chip when disabled and focused

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

Added in 1.0.0
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

Parameters
glow: Glow = Glow.None

the Glow behind this Button when enabled

focusedGlow: Glow = glow

the Glow behind this Button when focused

pressedGlow: Glow = glow

the Glow behind this Button when pressed

scale

Added in 1.0.0
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

Added in 1.0.0
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 Interactions

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

Added in 1.0.0
val ContainerHeightDp

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

ContainerShape

Added in 1.0.0
val ContainerShapeRoundedCornerShape

The default Shape applied to an assist chip

IconSize

Added in 1.0.0
val IconSizeDp

The size of an Assist chip icon