Documentation Index
Fetch the complete documentation index at: https://mintlify.com/danielitoCode/compose_svelted/llms.txt
Use this file to discover all available pages before exploring further.
Scaffold is a full-screen layout shell that mirrors Jetpack Compose’s Scaffold component. It stretches to fill its parent (width: 100%; height: 100%) and uses a vertical flex column to divide the screen into up to four named zones: a top bar, the main scrollable content area, a bottom bar, and a floating action button overlay. Any combination of zones can be used — empty slots simply take no space.
The FAB is rendered in an absolutely-positioned transparent overlay that covers the entire scaffold, so it never displaces content. Its exact corner is controlled by the fabAlignment prop.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modifier | Modifier | Modifier.empty() | Applied to the outermost scaffold container for additional sizing or styling. |
contentPadding | number | 16 | Pixel padding applied to the main content area (default slot). Set to 0 if the content manages its own padding. |
fabAlignment | BoxAlignment | Alignment.BottomEnd | Position of the floating action button within the scaffold. Accepts any Alignment.* box token. |
Named slots
| Slot | Purpose |
|---|---|
topBar | Renders at the very top of the screen — typically a Row-based app bar. Shrinks to its natural height. |
| (default) | The main content area. Receives contentPadding and fills all remaining vertical space between the top and bottom bars. Overflow is hidden — add Modifier.verticalScroll(true) or use LazyColumn inside. |
bottomBar | Renders at the very bottom — typically a navigation bar. Shrinks to its natural height. |
floatingActionButton | Rendered in the FAB overlay, positioned according to fabAlignment with a 16 px margin from the nearest edges. |
Example
The following example assembles a complete screen with all four slots populated:FAB alignment options
ThefabAlignment prop accepts any BoxAlignment token from the Alignment namespace. The most common choices are:
| Token | Position |
|---|---|
Alignment.BottomEnd | Bottom-right (default) |
Alignment.BottomStart | Bottom-left |
Alignment.BottomCenter | Bottom-center |
Alignment.TopEnd | Top-right |
Alignment.TopStart | Top-left |
Alignment.Center | Screen center |
Content padding
ThecontentPadding prop wraps the default slot only. Set it to 0 when your content component already handles its own insets, or when you need edge-to-edge rendering inside the content area.
The FAB overlay uses
pointer-events: none on the transparent backing layer and pointer-events: auto only on the FAB wrapper itself, so it never blocks click/tap events on the content below it.