Composable Function

Scaffold

A simple slot api component for displaying widget UI with a TitleBar.

Scaffold

Source set: Android
@Composable
public fun Scaffold(
    modifier: GlanceModifier = GlanceModifier,
    titleBar: @Composable (() -> Unit)? = null,
    backgroundColor: ColorProvider = GlanceTheme.colors.widgetBackground,
    horizontalPadding: Dp = 12.dp,
    content: @Composable () -> Unit,
)

A simple slot api component for displaying widget UI with a TitleBar. Sets the background color to GlanceTheme.colors.surface and applies padding. This is intended to be used as a top level component.

Parameters

modifier a modifier
titleBar A composable that creates the TitleBar. Optional parameter.
backgroundColor the background color for the layout.
horizontalPadding Scaffold provides a default padding which should work for most use cases. However, it can be overridden.
content The main content of the widget.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: