🌈 Create new beautiful Compose Gradients with our new wesite ->
Compose Component

ListItem

Material Design list Lists are continuous, vertical indexes of text or images.

ListItem social preview

ListItem

Source set: Common
@Composable
public fun ListItem(
    modifier: Modifier = Modifier,
    icon: @Composable (() -> Unit)? = null,
    secondaryText: @Composable (() -> Unit)? = null,
    singleLineSecondaryText: Boolean = true,
    overlineText: @Composable (() -> Unit)? = null,
    trailing: @Composable (() -> Unit)? = null,
    text: @Composable () -> Unit,
)

Parameters

modifier Modifier to be applied to the list item
icon The leading supporting visual of the list item
secondaryText The secondary text of the list item
singleLineSecondaryText Whether the secondary text is single line
overlineText The text displayed above the primary text
trailing The trailing meta text, icon, switch or checkbox
text The primary text of the list item