Composable Function

SpatialRow

A layout composable that arranges its children in a horizontal sequence.

SimpleSpatialRowSample

@Sampled
@Composable
public fun SimpleSpatialRowSample() {
    Subspace {
        SpatialRow(
            verticalAlignment = SpatialAlignment.CenterVertically,
            horizontalArrangement = SpatialArrangement.Center,
        ) {
            SpatialPanel(SubspaceModifier.weight(0.3f)) { Text("Left Panel") }
            SpatialPanel(modifier = SubspaceModifier.weight(0.3f)) { Text("Middle Panel") }
            SpatialPanel(modifier = SubspaceModifier.weight(0.3f)) { Text("Right Panel") }
        }
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: