<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/EnvironmentValues/splitArrangementAxis",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17EnvironmentValuesV20splitArrangementAxisAA0G0OSgvp"
  },
  "title" : "splitArrangementAxis"
}
-->

# splitArrangementAxis

The axis of the split for a view within a split arrangement view.

```
var splitArrangementAxis: Axis? { get set }
```

## Discussion

Use this value to read the axis that a split arrangement is using
to place its views. Views can adapt their layout or appearance
based on whether the split is horizontal or vertical. The value
is `nil` when the view is not contained within a split arrangement view.

```
struct DetailsView: View {
    @Environment(\.splitArrangementAxis) var axis

    var body: some View {
        let layout: AnyLayout = axis == .horizontal
            ? AnyLayout(VStackLayout())
            : AnyLayout(HStackLayout())
        layout {
            Artwork()
            Metadata()
        }
    }
}
```

---

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)