ListHeader
Composable Component
A slot based composable for creating a list header item. List header items are typically expected to be text. The contents provided will have text and colors effects applied based on the MaterialTheme. The contents will be start and end padded and should cover up to 3 lines of text.
Android
@Composable
public fun ListHeader(
modifier: Modifier = Modifier,
backgroundColor: Color = Color.Transparent,
contentColor: Color = MaterialTheme.colors.onSurfaceVariant,
content: @Composable RowScope.() -> Unit,
)
Parameters
modifier | The modifier for the list header |
backgroundColor | The background color to apply - typically Color.Transparent |
contentColor | The color to apply to content |
content | Slot for displayed header text |
Create your own Component Library
Material Components are meant to be used as is and they do not allow customizations. To build your own Jetpack Compose component library use Compose Unstyled