<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIStackView/alignment-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIStackView(py)alignment"
  },
  "title" : "alignment"
}
-->

# alignment

The alignment of the arranged subviews perpendicular to the stack view’s axis.

```
var alignment: UIStackView.Alignment { get set }
```

## Discussion

This property determines how the stack view lays out its arranged views perpendicularly to its axis. The default value is [`UIStackView.Alignment.fill`](/documentation/UIKit/UIStackView/Alignment-swift.enum/fill). For a list of possible values, see [`UIStackView.Alignment`](/documentation/UIKit/UIStackView/Alignment-swift.enum).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)