<div class='sourceset sourceset-common'>Common</div>

```kotlin
data class Horizontal(private val alignment: Alignment.Horizontal, private val margin: Int) :
        MenuPosition.Horizontal
```

A [MenuPosition.Horizontal](/jetpack-compose/androidx.compose.material3/material3/interfaces/MenuPosition.Horizontal) which horizontally aligns the menu within the window according to
the given [alignment](/jetpack-compose/androidx.glance/glance/classes/Alignment).

The resulting x position will be coerced so that the menu remains within the area inside the
given [margin](#margin) from the left and right edges of the window. If this is not possible, i.e.,
the menu is too wide, then it is centered horizontally instead.