Short answer: a Column in Jetpack Compose does not scroll by default. For a small, fixed amount of content, add Modifier.verticalScroll(rememberScrollState()) to the Column. For long or dynamic lists, use LazyColumn instead, because it only composes the items that are visible.
This guide shows both approaches with Kotlin code you can copy, explains when to use each one, and covers the mistakes that most often cause crashes. The examples use Material 3. For more topics, see all our Jetpack Compose tutorials.
Why a Column doesn’t scroll
A Column lays its children out vertically and measures itself to fit them. If the content is taller than the screen, the extra part is simply cut off, because nothing tells the Column to scroll. You have to add scrolling yourself.
Option 1: Column with verticalScroll
Use this when you have a fixed, short list of items, such as a form, a settings screen or a details page.
@Composable
fun ScrollableColumnExample() {
val scrollState = rememberScrollState()
Column(
modifier = Modifier
.fillMaxSize()
.verticalScroll(scrollState)
.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(12.dp)
) {
repeat(30) { index ->
Text(
text = "Item ${index + 1}",
style = MaterialTheme.typography.bodyLarge
)
}
}
}
Key points:
rememberScrollState()stores the scroll position and keeps it across recompositions.- Modifier order matters. Put
verticalScrollbeforepaddingso the padding scrolls with the content instead of staying fixed. - All children are composed at once, even the ones off screen.
Option 2: LazyColumn for long lists
Use LazyColumn for lists with many or unknown numbers of items, such as feeds or search results. It composes only what is visible, so it stays fast with thousands of items.
@Composable
fun LazyColumnExample(items: List<String>) {
LazyColumn(
modifier = Modifier.fillMaxSize(),
contentPadding = PaddingValues(16.dp),
verticalArrangement = Arrangement.spacedBy(12.dp)
) {
items(items, key = { it }) { item ->
Text(text = item)
}
}
}
Import androidx.compose.foundation.lazy.LazyColumn and androidx.compose.foundation.lazy.items. The key parameter helps Compose keep item state correct when the list changes, but only use it when each key is unique.
verticalScroll vs LazyColumn
| Column + verticalScroll | LazyColumn | |
|---|---|---|
| Items composed | All at once | Only visible items (plus a small buffer) |
| Best for | Short, fixed content (forms, detail screens) | Long or dynamic lists (feeds, search results) |
| Performance with big lists | Poor | Good |
| Scroll state | rememberScrollState() |
rememberLazyListState() |
Scroll to a position from code
To scroll with a button, use the scroll state inside a coroutine. Here is how to scroll a Column to the bottom:
@Composable
fun ScrollToBottomExample() {
val scrollState = rememberScrollState()
val scope = rememberCoroutineScope()
Column(modifier = Modifier.fillMaxSize()) {
Button(onClick = {
scope.launch { scrollState.animateScrollTo(scrollState.maxValue) }
}) {
Text("Scroll to bottom")
}
Column(
modifier = Modifier
.weight(1f)
.verticalScroll(scrollState)
) {
repeat(50) { Text("Row ${it + 1}") }
}
}
}
For a LazyColumn, create a rememberLazyListState(), pass it as the state parameter, and call listState.animateScrollToItem(index) inside a coroutine.
Common mistakes
- Putting a LazyColumn inside a verticalScroll Column. This crashes at runtime with an error about a vertically scrollable component measured with infinite maximum height. Use one scrolling container, or give the inner list a fixed height. To mix different content in one scrolling list, use several
item { }anditems(...)blocks inside a single LazyColumn. - Using verticalScroll for hundreds of items. Every item is composed up front, so the screen can feel slow. Switch to LazyColumn.
- Forgetting the scroll state when you need it. If you want to read or control the position, create the state yourself with
rememberScrollState()orrememberLazyListState(). - Wrong modifier order. Modifiers apply in the order you write them, so check where
paddingandverticalScrollsit.
FAQ
How do I make a Column scrollable in Jetpack Compose?
Add Modifier.verticalScroll(rememberScrollState()) to the Column. For long lists, use LazyColumn instead.
What is the difference between Column and LazyColumn?
A Column composes all of its children immediately and does not scroll on its own. A LazyColumn scrolls and composes only the visible items, which makes it better for long lists.
Can I put a LazyColumn inside a scrollable Column?
Not directly. Nesting them in the same direction crashes because the inner list gets infinite height. Use a single LazyColumn with multiple item blocks, or give the inner list a fixed height.
How do I scroll to a specific item?
For a Column, call scrollState.animateScrollTo(position). For a LazyColumn, call listState.animateScrollToItem(index). Run both from a coroutine, for example with rememberCoroutineScope().
Next, learn how to build the screens around your lists in our Android tutorials for beginners.