Question: Trying to align text elements as shown in the image below:

[![enter image description here](https://i.stack.imgur.com/EdcmS.png)](https://i.stack.imgur.com/EdcmS.png)

How to do it in Jetpack Compose?

Normally I would use a Linear Layout with vertical orientation and TextViews with a `rotation of 90`. Wondering how to achieve this in compose.

Answer: 
*compose\_verion: `1.0.0-beta02`*

To rotate an element you can use `Modifier.rotate()` modifier

```kotlin
Column {
     Text(text = "text", modifier = Modifier.rotate(-90f))
     Text(text = "text", modifier = Modifier.rotate(-90f))
     Text(text = "text", modifier = Modifier.rotate(-90f))
}

```
The solution with a custom modifier from [How to show vertical text with proper size/layout in jetpack compose](https://stackoverflow.com/questions/70057396/how-to-show-vertical-text-with-proper-size-layout-in-jetpack-compose) worked for me:

```kotlin
fun Modifier.vertical() = layout { measurable, constraints ->
    val placeable = measurable.measure(constraints)
    layout(placeable.height, placeable.width) {
        placeable.place(
            x = -(placeable.width / 2 - placeable.height / 2),
            y = -(placeable.height / 2 - placeable.width / 2)
        )
    }
}

```

Used as

```kotlin
Text(
    modifier = Modifier.vertical().rotate(-90f),
    text = "Vertical aligned element"
)

```

Credits to [Sergei S's answer](https://stackoverflow.com/a/70058688/3329810).