StylishModernScreen

fun StylishModernScreen(modifier: Modifier = Modifier, header: @Composable () -> Unit, containerColor: Color = MaterialTheme.colorScheme.background, statusBarScrimColor: Color = Color.Transparent, hideOnScroll: Boolean = true, scrollHideState: StylishScrollHideState = rememberStylishScrollHideState(), listState: LazyListState = rememberLazyListState(), horizontalContentPadding: Dp = StylishTheme.dimensions.screenPadding, bottomContentPadding: Dp = 24.dp, floatingBottomCenter: @Composable () -> Unit? = null, floatingActionButton: @Composable () -> Unit? = null, content: LazyListScope.() -> Unit)

The modern full-screen page: a floating pinned header, a full-bleed lazy content list, and floating overlays — with the scroll behavior built in.

The header height is measured synchronously (SubcomposeLayout) and applied as the list's initial top content padding, so content starts clear of the header and scrolls behind it.

Scroll behavior: detecting a downward scroll fully slides the header and floating layers out (200 ms); any upward scroll slides them fully back in. The floating layer is always visible while the list is at the top (including rubber-band bounce) and after pager page switches.

The status-bar zone is tinted with statusBarScrimColor while content scrolls beneath the floating layers (automatic scroll edge effect).

Parameters

header

Floating pinned top content. The scaffold owns the status-bar inset; header content must not add its own.

modifier

Modifier applied to the root.

containerColor

Page background.

statusBarScrimColor

Tint of the status-bar zone. Defaults to transparent — system icon contrast is the host activity's job.

hideOnScroll

When true (default), header and floating layers slide out on downward scrolls and return on upward scrolls.

scrollHideState

Optional hoisted state; share one instance across screens to coordinate them, or read StylishScrollHideState.visible for extra floating elements of your own.

listState

Hoisted LazyListState for the content list.

horizontalContentPadding

Horizontal padding of the content list.

bottomContentPadding

Extra bottom padding after the last item (the navigation-bar inset is reserved automatically).

floatingBottomCenter

Optional overlay anchored bottom-center (e.g. a pager indicator pill).

floatingActionButton

Optional FAB anchored bottom-end.

content

Lazy list content.