JengaScaffold

fun JengaScaffold(modifier: Modifier = Modifier, topBar: @Composable () -> Unit = {}, bottomBar: @Composable () -> Unit = {}, snackbarHost: @Composable () -> Unit = {}, containerColor: Color = JengaScaffoldDefaults.containerColor, contentColor: Color = JengaScaffoldDefaults.contentColor, contentWindowInsets: WindowInsets = JengaScaffoldDefaults.contentWindowInsets, content: @Composable (PaddingValues) -> Unit)(source)

The structural shell for a Jenga screen: a background, optional top/bottom bars, and a content area inset to avoid them.

Thin wrapper over the (internal) Material 3 Scaffold for correct inset and bar handling, themed with Jenga tokens. Pass the provided PaddingValues to your content's outermost scrollable/container.

Parameters

modifier

the Modifier for the scaffold.

topBar

slot for a top app bar (e.g. JengaTopAppBar).

bottomBar

slot for a bottom bar.

snackbarHost

slot for a snackbar host (e.g. JengaSnackbarHost).

containerColor

the background color; defaults to JengaScaffoldDefaults.containerColor.

contentColor

the foreground color; defaults to JengaScaffoldDefaults.contentColor.

contentWindowInsets

insets the content is kept clear of; defaults to the system bars. Use WindowInsets(0, 0, 0, 0) when an ancestor already owns the insets.

content

the screen body; receives inset padding to respect the bars.

Samples

JengaScaffold(
    topBar = {
        JengaTopAppBar(
            title = "Events",
        )
    },
    content = { padding ->
        Column(
            modifier = Modifier.padding(
                paddingValues = padding,
            ),
            content = {
                JengaText(
                    text = "Content",
                )
            },
        )
    },
)