ListHeader

A slot based composable for creating a list header item.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

ListHeader

Android
@Composable
public fun ListHeader(
    modifier: Modifier = Modifier,
    backgroundColor: Color = Color.Transparent,
    contentColor: Color = ListHeaderDefaults.contentColor,
    contentPadding: PaddingValues = ListHeaderDefaults.ContentPadding,
    transformation: SurfaceTransformation? = null,
    content: @Composable RowScope.() -> Unit,
)

Parameters

modifier The modifier for the ListHeader.
backgroundColor The background color to apply - typically Color.Transparent
contentColor The color to apply to content.
contentPadding The spacing values to apply internally between the background and the content.
transformation Transformation to be used when header appears inside the container that needs to dynamically change its content separately from the background.
content Slot for ListHeader content, expected to be a single line of text.