---
title: "Scaffold"
description: "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."
type: "composable"
---

<div class='type'>Composable Function</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@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. |





