StylishPageContent

fun StylishPageContent(header: @Composable () -> Unit, listState: LazyListState = rememberLazyListState(), modifier: Modifier = Modifier, contentPadding: PaddingValues = PaddingValues(horizontal = DefaultStylishDimensions.screenPadding), headerSpacing: Dp = Dp.Unspecified, verticalArrangement: Arrangement.Vertical = Arrangement.Top, horizontalAlignment: Alignment.Horizontal = Alignment.Start, reverseLayout: Boolean = false, userScrollEnabled: Boolean = true, content: LazyListScope.() -> Unit)

A page-content pattern that renders a header as the first item of a scrollable lazy list.

Wraps a LazyColumn whose first item is the header composable (typically a StylishHeader) followed by a spacer and the caller's list items. Use this inside StylishScaffold's content slot as the standard layout for list-driven screens.

Parameters

header

Composable rendered as the first item of the list (scrolls with the content). Typically a StylishHeader with the page title and navigation actions.

listState

LazyListState controlling scroll position. Defaults to rememberLazyListState. Supply a hoisted state to observe scroll offset or programmatically scroll.

modifier

Modifier applied to the underlying LazyColumn.

contentPadding

PaddingValues applied around the entire lazy list. Defaults to DefaultStylishDimensions.screenPadding horizontal padding (20.dp).

headerSpacing

Vertical gap between the header and the first list item. Defaults to Dp.Unspecified, which resolves to the active theme's StylishTheme.dimensions.itemSpacing so global theme overrides apply. Pass an explicit value to override.

verticalArrangement

Arrangement.Vertical governing spacing and alignment of list items. Defaults to Arrangement.Top.

horizontalAlignment

Horizontal alignment of the list items inside the LazyColumn. Defaults to Alignment.Start.

reverseLayout

When true, items are laid out bottom to top and the list scrolls toward its top edge. Defaults to false.

userScrollEnabled

Whether the user can scroll the list via touch input. Defaults to true.

content

LazyListScope receiver where the caller emits list items via item {} / items {} builders.

See also