# Column A Column will show each child below the previous children. It's similar to a LinearLayout with vertical orientation.

```kotlin @Composable fun ColumnExample() { Column { Text("Hello World!") Text("Hello World!2") } } ``` ## Content Alignment ### Horizontal You can use **horizontalAlignment** to set the horizontal alignment of the content in the Column === "Alignment.Start"

```kotlin @Composable fun ColumnCenterHorizontal() { Column(horizontalAlignment = Alignment.Start, modifier = Modifier.width(200.dp)) { Text("Hello World!") Text("Hello World!2") } } ``` === "Alignment.CenterHorizontally"

```kotlin @Composable fun ColumnCenterHorizontal() { Column(horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier.width(200.dp)) { Text("Hello World!") Text("Hello World!2") } } ``` === "Alignment.End"

```kotlin @Composable fun ColumnCenterHorizontal() { Column(horizontalAlignment = Alignment.End, modifier = Modifier.width(200.dp)) { Text("Hello World!") Text("Hello World!2") } } ``` You can also use the *align* modifier: === "Modifier.align(Alignment.Start)"

```kotlin @Composable fun ColumnCenterHorizontal() { Column(modifier = Modifier.width(200.dp)) { Text("Hello World!") Text("Hello World!2", modifier = Modifier.align(Alignment.Start)) } } ``` === "Modifier.align(Alignment.CenterHorizontally)"

```kotlin @Composable fun ColumnCenterHorizontal() { Column(modifier = Modifier.width(200.dp)) { Text("Hello World!") Text("Hello World!2",modifier = Modifier.align(Alignment.CenterHorizontally)) } } ``` === "Modifier.align(Alignment.End)"

```kotlin @Composable fun ColumnCenterHorizontal() { Column(modifier = Modifier.width(200.dp)) { Text("Hello World!") Text("Hello World!2",modifier = Modifier.align(Alignment.End)) } } ``` ### Vertical You can use **verticalArrangement** to set the vertical alignment of the content in the Column === "Arrangement.Top"

```kotlin @Composable fun ColumnVerticalTop() { Column(verticalArrangement = Arrangement.Top, modifier = Modifier.height(100.dp).background(Color.LightGray)) { Text("Hello World!") Text("Hello World!2") } } ``` === "Arrangement.Center"

```kotlin @Composable fun ColumnVerticalCenter() { Column(verticalArrangement = Arrangement.Center, modifier = Modifier.height(100.dp).background(Color.LightGray)) { Text("Hello World!") Text("Hello World!2") } } ``` === "Arrangement.Bottom"

```kotlin @Composable fun ColumnVerticalBottom() { Column(verticalArrangement = Arrangement.Bottom, modifier = Modifier.height(100.dp).background(Color.LightGray)) { Text("Hello World!") Text("Hello World!2") } } ``` ## See also: * [Official Docs](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/package-summary#column) * [Full Example Code]({{ site.samplefolder }}/layout/ColumnExample.kt)