StylishScaffold

fun StylishScaffold(modifier: Modifier = Modifier, header: @Composable () -> Unit, containerColor: Color = MaterialTheme.colorScheme.background, statusBarScrimColor: Color = Color.Transparent, hideOnScroll: Boolean = false, scrollHideState: StylishScrollHideState = rememberStylishScrollHideState(), floatingBottomCenter: @Composable () -> Unit? = null, floatingActionButton: @Composable () -> Unit? = null, content: @Composable (headerHeight: Dp) -> Unit)

Modern overlay-style page scaffold (the canonical Stylish scaffold). Content fills the entire screen and scrolls behind the pinned header; nothing is pushed down by padding.

The header floats above the content on a gradient scrim of containerColor: near the status bar it is fully opaque so the title stays legible, fading out downward so scrolled content remains visible right up to the title line.

Unlike inset-based scaffolds, content receives the measured header height (headerHeight) instead of padding that clips the content area. Use it as the initial top spacing of your scrollable (e.g. a LazyColumn contentPadding.top) so the first item clears the header at rest, while scrolled items keep flowing behind it. Pass nothing if you truly want full-bleed from pixel zero.

Parameters

header

Pinned floating top content (title, navigation, actions). The scaffold owns the status-bar inset: it clears and consumes it, so header content must not add its own top status-bar padding.

modifier

Modifier applied to the root.

containerColor

Page background.

statusBarScrimColor

Optional scrim across the status-bar zone. Defaults to transparent — system bar icon contrast is expected to be handled by the host activity (e.g. enableEdgeToEdge styles synced with the app theme).

hideOnScroll

When true, the header slides away on downward scrolls of ANY nested scrollable inside the content and returns on upward scrolls.

scrollHideState

State backing hideOnScroll; hoist to observe or reset it.

floatingBottomCenter

Optional overlay anchored to the bottom center (e.g. a pager indicator pill), above the navigation-bar inset.

floatingActionButton

Optional FAB anchored to the bottom end, above the navigation-bar inset.

content

Full-bleed page content. Receives the measured header height (including the status bar) as its initial top clearance.