FilterChipDefaults

@ExperimentalTvMaterial3Api
object FilterChipDefaults


Contains the default values used by FilterChip.

Summary

Public functions

SelectableChipBorder
@Composable
border(
    border: Border,
    focusedBorder: Border,
    pressedBorder: Border,
    selectedBorder: Border,
    disabledBorder: Border,
    focusedSelectedBorder: Border,
    focusedDisabledBorder: Border,
    pressedSelectedBorder: Border,
    selectedDisabledBorder: Border,
    focusedSelectedDisabledBorder: Border
)

Creates a SelectableChipBorder that represents the default Borders applied on a FilterChip in different Interaction states

SelectableChipColors
@Composable
colors(
    containerColor: Color,
    contentColor: Color,
    focusedContainerColor: Color,
    focusedContentColor: Color,
    pressedContainerColor: Color,
    pressedContentColor: Color,
    selectedContainerColor: Color,
    selectedContentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    focusedSelectedContainerColor: Color,
    focusedSelectedContentColor: Color,
    pressedSelectedContainerColor: Color,
    pressedSelectedContentColor: Color
)

Creates a SelectableChipColors that represents the default container and content colors used in a FilterChip

SelectableChipGlow
glow(
    glow: Glow,
    focusedGlow: Glow,
    pressedGlow: Glow,
    selectedGlow: Glow,
    focusedSelectedGlow: Glow,
    pressedSelectedGlow: Glow
)

Creates a SelectableChipGlow that represents the default Glows used in a FilterChip

SelectableChipScale
scale(
    scale: @FloatRange(from = 0.0) Float,
    focusedScale: @FloatRange(from = 0.0) Float,
    pressedScale: @FloatRange(from = 0.0) Float,
    selectedScale: @FloatRange(from = 0.0) Float,
    disabledScale: @FloatRange(from = 0.0) Float,
    focusedSelectedScale: @FloatRange(from = 0.0) Float,
    focusedDisabledScale: @FloatRange(from = 0.0) Float,
    pressedSelectedScale: @FloatRange(from = 0.0) Float,
    selectedDisabledScale: @FloatRange(from = 0.0) Float,
    focusedSelectedDisabledScale: @FloatRange(from = 0.0) Float
)

Creates a SelectableChipScale that represents the default scaleFactors used in a FilterChip. 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

SelectableChipShape
shape(
    shape: Shape,
    focusedShape: Shape,
    pressedShape: Shape,
    selectedShape: Shape,
    disabledShape: Shape,
    focusedSelectedShape: Shape,
    focusedDisabledShape: Shape,
    pressedSelectedShape: Shape,
    selectedDisabledShape: Shape,
    focusedSelectedDisabledShape: Shape
)

Creates a SelectableChipShape that represents the default container shapes used in a FilterChip

Public properties

Dp

The height applied to a filter chip.

RoundedCornerShape

The default Shape applied to a filter chip

Dp

The size of a Filter 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,
    selectedBorder: Border = Border( border = BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.secondary), shape = ContainerShape ),
    disabledBorder: Border = Border( border = BorderStroke(width = 1.dp, color = MaterialTheme.colorScheme.surfaceVariant), shape = ContainerShape ),
    focusedSelectedBorder: Border = Border( border = BorderStroke( width = 1.1.dp, color = MaterialTheme.colorScheme.onPrimaryContainer ), shape = ContainerShape ),
    focusedDisabledBorder: Border = border,
    pressedSelectedBorder: Border = Border.None,
    selectedDisabledBorder: Border = Border.None,
    focusedSelectedDisabledBorder: Border = border
): SelectableChipBorder

Creates a SelectableChipBorder that represents the default Borders applied on a FilterChip in different Interaction states

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

the Border used when the Chip is enabled, and has no other Interactions

focusedBorder: Border = Border.None

the Border used when the Chip is enabled and focused

pressedBorder: Border = focusedBorder

the Border used when the Chip is enabled and pressed

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

the Border used when the Chip is enabled and selected

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

the Border used when the Chip is not enabled

focusedSelectedBorder: Border = Border( border = BorderStroke( width = 1.1.dp, color = MaterialTheme.colorScheme.onPrimaryContainer ), shape = ContainerShape )

the Border used when the Chip is enabled, focused and selected

focusedDisabledBorder: Border = border

the Border used when the Chip is not enabled and focused

pressedSelectedBorder: Border = Border.None

the Border used when the Chip is enabled, pressed and selected

selectedDisabledBorder: Border = Border.None

the Border used when the Chip is not enabled and selected

focusedSelectedDisabledBorder: Border = border

the Border used when the Chip is not enabled, focused and selected

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,
    selectedContainerColor: Color = MaterialTheme.colorScheme.secondaryContainer.copy( alpha = SelectedBackgroundColorOpacity ),
    selectedContentColor: Color = MaterialTheme.colorScheme.onSecondaryContainer,
    disabledContainerColor: Color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = DisabledBackgroundColorOpacity),
    disabledContentColor: Color = MaterialTheme.colorScheme.border.copy(alpha = DisabledContentColorOpacity),
    focusedSelectedContainerColor: Color = MaterialTheme.colorScheme.onPrimaryContainer,
    focusedSelectedContentColor: Color = MaterialTheme.colorScheme.onPrimary,
    pressedSelectedContainerColor: Color = MaterialTheme.colorScheme.secondary,
    pressedSelectedContentColor: Color = MaterialTheme.colorScheme.onSecondary
): SelectableChipColors

Creates a SelectableChipColors that represents the default container and content colors used in a FilterChip

Parameters
containerColor: Color = Color.Transparent

the container color used when the Chip is enabled, and has no other Interactions

contentColor: Color = MaterialTheme.colorScheme.onSurfaceVariant

the content color used when the Chip is enabled, and has no other Interactions

focusedContainerColor: Color = MaterialTheme.colorScheme.onSurface

the container color used when the Chip is enabled and focused

focusedContentColor: Color = MaterialTheme.colorScheme.inverseOnSurface

the content color used when the Chip is enabled and focused

pressedContainerColor: Color = MaterialTheme.colorScheme.onSurfaceVariant

the container color used when the Chip is enabled and pressed

pressedContentColor: Color = MaterialTheme.colorScheme.surface

the content color used when the Chip is enabled and pressed

selectedContainerColor: Color = MaterialTheme.colorScheme.secondaryContainer.copy( alpha = SelectedBackgroundColorOpacity )

the container color used when the Chip is enabled and selected

selectedContentColor: Color = MaterialTheme.colorScheme.onSecondaryContainer

the content color used when the Chip is enabled and selected

disabledContainerColor: Color = MaterialTheme.colorScheme.surfaceVariant.copy(alpha = DisabledBackgroundColorOpacity)

the container color used when the Chip is not enabled

disabledContentColor: Color = MaterialTheme.colorScheme.border.copy(alpha = DisabledContentColorOpacity)

the content color used when the Chip is not enabled

focusedSelectedContainerColor: Color = MaterialTheme.colorScheme.onPrimaryContainer

the container color used when the Chip is enabled, focused and selected

focusedSelectedContentColor: Color = MaterialTheme.colorScheme.onPrimary

the content color used when the Chip is enabled, focused and selected

pressedSelectedContainerColor: Color = MaterialTheme.colorScheme.secondary

the container color used when the Chip is enabled, pressed and selected

pressedSelectedContentColor: Color = MaterialTheme.colorScheme.onSecondary

the content color used when the Chip is enabled, pressed and selected

glow

Added in 1.0.0
fun glow(
    glow: Glow = Glow.None,
    focusedGlow: Glow = glow,
    pressedGlow: Glow = glow,
    selectedGlow: Glow = glow,
    focusedSelectedGlow: Glow = focusedGlow,
    pressedSelectedGlow: Glow = glow
): SelectableChipGlow

Creates a SelectableChipGlow that represents the default Glows used in a FilterChip

Parameters
glow: Glow = Glow.None

the Glow used when the Chip is enabled, and has no other Interactions

focusedGlow: Glow = glow

the Glow used when the Chip is enabled and focused

pressedGlow: Glow = glow

the Glow used when the Chip is enabled and pressed

selectedGlow: Glow = glow

the Glow used when the Chip is enabled and selected

focusedSelectedGlow: Glow = focusedGlow

the Glow used when the Chip is enabled, focused and selected

pressedSelectedGlow: Glow = glow

the Glow used when the Chip is enabled, pressed and selected

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,
    selectedScale: @FloatRange(from = 0.0) Float = scale,
    disabledScale: @FloatRange(from = 0.0) Float = scale,
    focusedSelectedScale: @FloatRange(from = 0.0) Float = focusedScale,
    focusedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale,
    pressedSelectedScale: @FloatRange(from = 0.0) Float = scale,
    selectedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale,
    focusedSelectedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale
): SelectableChipScale

Creates a SelectableChipScale that represents the default scaleFactors used in a FilterChip. 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 used when the Chip is enabled, and has no other Interactions

focusedScale: @FloatRange(from = 0.0) Float = 1.1f

the scaleFactor used when the Chip is enabled and focused

pressedScale: @FloatRange(from = 0.0) Float = scale

the scaleFactor used when the Chip is enabled and pressed

selectedScale: @FloatRange(from = 0.0) Float = scale

the scaleFactor used when the Chip is enabled and selected

disabledScale: @FloatRange(from = 0.0) Float = scale

the scaleFactor used when the Chip is not enabled

focusedSelectedScale: @FloatRange(from = 0.0) Float = focusedScale

the scaleFactor used when the Chip is enabled, focused and selected

focusedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale

the scaleFactor used when the Chip is not enabled and focused

pressedSelectedScale: @FloatRange(from = 0.0) Float = scale

the scaleFactor used when the Chip is enabled, pressed and selected

selectedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale

the scaleFactor used when the Chip is not enabled and selected

focusedSelectedDisabledScale: @FloatRange(from = 0.0) Float = disabledScale

the scaleFactor used when the Chip is not enabled, focused and selected

shape

Added in 1.0.0
fun shape(
    shape: Shape = ContainerShape,
    focusedShape: Shape = shape,
    pressedShape: Shape = shape,
    selectedShape: Shape = shape,
    disabledShape: Shape = shape,
    focusedSelectedShape: Shape = shape,
    focusedDisabledShape: Shape = disabledShape,
    pressedSelectedShape: Shape = shape,
    selectedDisabledShape: Shape = disabledShape,
    focusedSelectedDisabledShape: Shape = disabledShape
): SelectableChipShape

Creates a SelectableChipShape that represents the default container shapes used in a FilterChip

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 and pressed

selectedShape: Shape = shape

the shape used when the Chip is enabled and selected

disabledShape: Shape = shape

the shape used when the Chip is not enabled

focusedSelectedShape: Shape = shape

the shape used when the Chip is enabled, focused and selected

focusedDisabledShape: Shape = disabledShape

the shape used when the Chip is not enabled and focused

pressedSelectedShape: Shape = shape

the shape used when the Chip is enabled, pressed and selected

selectedDisabledShape: Shape = disabledShape

the shape used when the Chip is not enabled and selected

focusedSelectedDisabledShape: Shape = disabledShape

the shape used when the Chip is not enabled, focused and selected

Public properties

ContainerHeight

Added in 1.0.0
val ContainerHeightDp

The height applied to a filter 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 a filter chip

IconSize

Added in 1.0.0
val IconSizeDp

The size of a Filter chip icon