Start native apps faster with the Composables CLI ->
Function

verticalScroll

Modify element to allow it to scroll vertically when its content is larger than its constraints.

VerticalScrollSample

@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun VerticalScrollSample() {
    val scrollState = rememberRemoteScrollState()
    RemoteColumn(
        modifier =
            RemoteModifier.size(200.rdp).background(Color.LightGray.rc).verticalScroll(scrollState)
    ) {
        for (i in 1..10) {
            RemoteBox(
                modifier =
                    RemoteModifier.size(180.rdp, 50.rdp).padding(5.rdp).background(Color.Red.rc),
                contentAlignment = RemoteAlignment.Center,
            ) {
                RemoteText("Item $i".rs, color = Color.White.rc)
            }
        }
    }
}