ExtraPaneScaffold

fun ExtraPaneScaffold(title: @Composable () -> Unit, onCloseClick: () -> Unit, modifier: Modifier = Modifier, actions: @Composable () -> Unit = {}, scaffoldDirective: PaneScaffoldDirective = calculatePaneScaffoldDirective(currentWindowAdaptiveInfoV2()), scrollState: ScrollState? = null, content: @Composable (PaddingValues) -> Unit)

An adaptive scaffold designed for extra or secondary panes in a multi-pane layout.

This scaffold adapts its appearance and layout behavior based on whether it is displayed in a single-pane or multi-pane configuration (determined by scaffoldDirective):

  • Single-pane layout: Acts like a standard full-screen scaffold with a pinned TopAppBar, a surface container color, and full safe drawing insets.

  • Multi-pane layout: Renders as a floating card-style pane with a higher surface container color (ComicTheme.colorScheme.surfaceContainerHigh), clipped to ComicTheme.shapes.large, with appropriate margins and window insets applied. When scrollState is provided and content is scrolled, a HorizontalDivider is displayed beneath the top bar.

Parameters

title

The title composable displayed in the TopAppBar.

onCloseClick

Callback invoked when the close icon button is clicked.

modifier

The Modifier to be applied to the scaffold.

actions

The composable displayed in the bottom bar slot (e.g. action buttons).

scaffoldDirective

The PaneScaffoldDirective specifying pane layout configuration, defaults to calculating from currentWindowAdaptiveInfoV2.

scrollState

The ScrollState of the inner content, used in multi-pane mode to display a divider under the top app bar when scrolled backward. Pass null if scrolling is not tracked.

content

The main content of the scaffold, receiving the scaffold's PaddingValues.