---
title: "subscript(_:)"
framework: swiftui
role: symbol
role_heading: Instance Subscript
path: "swiftui/viewdimensions/subscript(_:)"
---

# subscript(_:)

Gets the value of the given horizontal guide.

## Declaration

```swift
subscript(guide: HorizontalAlignment) -> CGFloat { get }
```

## Overview

Overview Find the offset of a particular guide in the corresponding view by using that guide as an index to read from the context: .alignmentGuide(.leading) { context in     context[.leading] - 10 } For information about using subscripts in Swift to access member elements of a collection, list, or, sequence, see Subscripts in The Swift Programming Language.

## See Also

### Accessing guide values

- [subscript(explicit:)](swiftui/viewdimensions/subscript(explicit:).md)
