<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Vision",
  "identifier" : "/documentation/Vision/DocumentObservation/Container/Text-swift.struct/Alignment",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Vision"
    ],
    "preciseIdentifier" : "s:6Vision19DocumentObservationV9ContainerV4TextV9AlignmentO"
  },
  "title" : "DocumentObservation.Container.Text.Alignment"
}
-->

# DocumentObservation.Container.Text.Alignment

The different text alignment types within a container.

```
enum Alignment
```

## Topics

### Getting the alignment

[`case center`](/documentation/Vision/DocumentObservation/Container/Text-swift.struct/Alignment/center)

Text aligns horizontally to the center of the container.

[`case leading`](/documentation/Vision/DocumentObservation/Container/Text-swift.struct/Alignment/leading)

Text aligns to the left edge of the container.

[`case trailing`](/documentation/Vision/DocumentObservation/Container/Text-swift.struct/Alignment/trailing)

Lines aligned with a right edge within the container.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`Encodable`](/documentation/Swift/Encodable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Decodable`](/documentation/Swift/Decodable)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)