ListItemDefaults


Contains the default values used by list items.

Summary

Public functions

ListItemColors
@Composable
colors(
    containerColor: Color,
    headlineColor: Color,
    leadingIconColor: Color,
    overlineColor: Color,
    supportingColor: Color,
    trailingIconColor: Color,
    disabledHeadlineColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

Creates a ListItemColors that represents the default container and content colors used in a ListItem.

Cmn

Public properties

Dp

The default elevation of a list item

Cmn
Color

The container color of a list item

Cmn
Color

The content color of a list item

Cmn
Shape

The default shape of a list item

Cmn

Public functions

colors

@Composable
fun colors(
    containerColor: Color = ListTokens.ListItemContainerColor.value,
    headlineColor: Color = ListTokens.ListItemLabelTextColor.value,
    leadingIconColor: Color = ListTokens.ListItemLeadingIconColor.value,
    overlineColor: Color = ListTokens.ListItemOverlineColor.value,
    supportingColor: Color = ListTokens.ListItemSupportingTextColor.value,
    trailingIconColor: Color = ListTokens.ListItemTrailingIconColor.value,
    disabledHeadlineColor: Color = ListTokens.ListItemDisabledLabelTextColor.value .copy(alpha = ListTokens.ListItemDisabledLabelTextOpacity),
    disabledLeadingIconColor: Color = ListTokens.ListItemDisabledLeadingIconColor.value .copy(alpha = ListTokens.ListItemDisabledLeadingIconOpacity),
    disabledTrailingIconColor: Color = ListTokens.ListItemDisabledTrailingIconColor.value .copy(alpha = ListTokens.ListItemDisabledTrailingIconOpacity)
): ListItemColors

Creates a ListItemColors that represents the default container and content colors used in a ListItem.

Parameters
containerColor: Color = ListTokens.ListItemContainerColor.value

the container color of this list item when enabled.

headlineColor: Color = ListTokens.ListItemLabelTextColor.value

the headline text content color of this list item when enabled.

leadingIconColor: Color = ListTokens.ListItemLeadingIconColor.value

the color of this list item's leading content when enabled.

overlineColor: Color = ListTokens.ListItemOverlineColor.value

the overline text color of this list item

supportingColor: Color = ListTokens.ListItemSupportingTextColor.value

the supporting text color of this list item

trailingIconColor: Color = ListTokens.ListItemTrailingIconColor.value

the color of this list item's trailing content when enabled.

disabledHeadlineColor: Color = ListTokens.ListItemDisabledLabelTextColor.value .copy(alpha = ListTokens.ListItemDisabledLabelTextOpacity)

the content color of this list item when not enabled.

disabledLeadingIconColor: Color = ListTokens.ListItemDisabledLeadingIconColor.value .copy(alpha = ListTokens.ListItemDisabledLeadingIconOpacity)

the color of this list item's leading content when not enabled.

disabledTrailingIconColor: Color = ListTokens.ListItemDisabledTrailingIconColor.value .copy(alpha = ListTokens.ListItemDisabledTrailingIconOpacity)

the color of this list item's trailing content when not enabled.

Public properties

Elevation

val ElevationDp

The default elevation of a list item

containerColor

val containerColorColor

The container color of a list item

contentColor

val contentColorColor

The content color of a list item

shape

val shapeShape

The default shape of a list item