Nutrient Status Bar Scrim
A scrim over the status-bar strip, optionally blurring the content behind it.
The SDK's own main toolbar covers this strip with its background (NutrientMainToolbar insets its row inside its Surface), so this is for hosts that took the top slot over — defaultToolbarEnabled(false) with a custom toolbar that sits below the status bar rather than behind it, a floating pill being the usual shape. Without it the document scrolls visibly under the system clock and battery icons.
Place it between the document and the toolbar, aligned to the top, with the document recording into the same backdrop through nutrientBackdropSource:
val backdrop = rememberNutrientBackdropState()
Box(Modifier.fillMaxSize()) {
DocumentView(documentState, Modifier.fillMaxSize().nutrientBackdropSource(backdrop))
NutrientStatusBarScrim(
state = backdrop,
modifier = Modifier.align(Alignment.TopCenter),
visible = frame.isVisible,
)
// … the custom toolbar …
}Most hosts want com.pspdfkit.jetpack.compose.toolbar.NutrientDocumentStatusBarScrim instead, which derives visible from the document's own state and documents the full setup.
The strip takes its height from windowInsets, which defaults to WindowInsets.Companion.statusBars — so it collapses to nothing on a host that is not edge-to-edge, and is 0.dp tall while the system hides the status bar.
blurRadius is ignored below Android 12 (API 31), where the platform has no render effect to apply — those devices get color alone, which is why color should stay legible on its own rather than relying on the blur to carry the contrast.
Parameters
The backdrop the document view records into through nutrientBackdropSource. Pass the same instance.
Applied to the strip. Align it to the top of the parent.
Tint painted over the blur. Also the entire effect below API 31. Defaults to NutrientStatusBarScrimDefaults.tint, a translucent light in light mode and dark in dark mode, the way the iOS system material lifts a dark page just enough to keep the status bar legible.
Blur applied to the content behind the strip; 0.dp paints color only.
Whether the scrim shows. Fades on NutrientStatusBarScrimDefaults.fadeSpec rather than cutting, so it can follow a toolbar's own show/hide (ToolbarCoordinator.frame's isVisible) without the strip popping.
The strip's height, following the NutrientMainToolbar convention. Override it for a host that reserves the top differently than the live status-bar inset says.