Scaffold: The Screen Skeleton
Wire up the standard app layout slots.
Scaffold: The Screen Skeleton is a free Jetpack Compose Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Jetpack Compose Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Meet Scaffold
Most app screens share the same skeleton: a bar on top, content in the middle, maybe a button floating below. Scaffold gives you all of that in one Composable. 🏗️
Why Not Just a Column?
You could hand-build bars with a Column, but you would re-solve insets, spacing, and overlaps every time. Scaffold wires those standard pieces together for you.
The Slot Idea
Scaffold works with slots: named spots where you drop a Composable. You fill the slots you want and leave the rest empty.
The content Slot
The one slot you almost always use is content. It is the main body of your screen, and Scaffold hands it the right padding to use.
Scaffold { innerPadding ->
Text("Hello", Modifier.padding(innerPadding))
}Honor innerPadding
That innerPadding keeps your content from hiding under bars. Always apply it to your top-level content, or text can slip beneath the app bar.
The topBar Slot
Drop a bar into the topBar slot and Scaffold pins it to the top, then shrinks the content area so nothing overlaps.
Scaffold(
topBar = { TopAppBar(title = { Text("Home") }) }
) { padding -> }More Slots Available
Scaffold also offers bottomBar, floatingActionButton, and snackbarHost slots. You will meet each one in this course.
Leave Slots Empty
Every slot is optional. A Scaffold with only content is perfectly valid, so you add bars only when a screen actually needs them.
One Scaffold Per Screen
The usual rule is one Scaffold per screen. It frames that whole screen, while smaller Composables fill its content slot.
Scaffold Is Material 3
Import Scaffold from androidx.compose.material3 so its colors and spacing match the rest of your Material You theme.
import androidx.compose.material3.ScaffoldcontainerColor
Set containerColor to paint the screen background behind every slot. Skip it and Scaffold uses your theme's surface color by default.
Quick Check
What is the safest thing to do with the value Scaffold passes to its content lambda?
Recap
Scaffold is your screen skeleton: fill named slots like content and topBar, honor innerPadding, and use one per screen. Next you will style the top bar. 👍
Frequently asked questions
Is the “Scaffold: The Screen Skeleton” lesson free?
Yes — the full text of “Scaffold: The Screen Skeleton” is free to read here on the web, and the Jetpack Compose Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Jetpack Compose Academy course, upgrade to CoddyKit PRO.
What will I learn in “Scaffold: The Screen Skeleton”?
Wire up the standard app layout slots. You practise Jetpack Compose Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Jetpack Compose Academy?
No prior experience is required. Jetpack Compose Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Scaffold: The Screen Skeleton” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Jetpack Compose Academy lesson?
Yes. Every Jetpack Compose Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Scaffold: The Screen Skeleton
- TopAppBar & Action Icons
- Bottom Bars & Floating Action Buttons
- Snackbars & SnackbarHostState