Row¶
@Composable
fun Row(
modifier: Modifier = Modifier,
horizontalArrangement: Arrangement.Horizontal = Arrangement.Start,
verticalAlignment: Alignment.Vertical = Alignment.Top,
content: @Composable
() -> Unit
)
A layout composable that arranges its children in a horizontal sequence from left to right.
Children are measured sequentially and their widths subtracted from the available space. Use horizontalArrangement to control spacing and alignment along the main axis, and verticalAlignment to align children along the cross axis.
Example¶
Row(
horizontalArrangement = Arrangement.spacedBy(8),
verticalAlignment = Alignment.CenterVertically,
) {
Icon(...)
Text(Component.literal("Label"))
}
Parameters¶
-
modifier: Modifiers applied to the Row node.
-
horizontalArrangement: Controls spacing and placement along the horizontal axis.
-
verticalAlignment: Controls alignment of children along the vertical axis.
-
content: The child composables to lay out in a row.