Skip to content
Gestures & Scroll

Scroll

Modifier.verticalScroll over a fixed-height Column

For a known, modest number of items a plain Column made scrollable with Modifier.verticalScroll(rememberScrollState()) is simpler than a lazy list.

Scroll demos rendered in Compose Playground
Pixel-accurate preview · light theme

Examples

01

Scrollable Column

All rows are composed eagerly; the viewport is capped at 180 dp.

Kotlin
val scroll = rememberScrollState()
Column(
    Modifier
        .height(180.dp)
        .verticalScroll(scroll)
) {
    repeat(20) { index ->
        Text("Row $index", Modifier.padding(8.dp))
    }
}