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

# toolbarVerticalEdge

This value reflects the system’s preferred edge for the vertical bar
in the current context, regardless of whether a vertical bar is
currently visible. Use it to position custom bars or other UI
relative to the system’s bar placement.

```
var toolbarVerticalEdge: HorizontalEdge? { get }
```

## Discussion

This value is read-only; the system determines the edge based on
locale and device.

Returns `nil` on devices and in contexts where the system never places
a vertical bar — for example hardware without a vertical bar, or a size
class or orientation in which no vertical bar is used.

```
struct ContentView: View {
    @Environment(\.toolbarVerticalEdge) var toolbarVerticalEdge

    var body: some View {
        FloatingToolPalette()
            .frame(maxWidth: .infinity,
                   alignment: toolbarVerticalEdge == .trailing
                       ? .trailing : .leading)
    }
}
```

---

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)