---
title: Text.AlignmentStrategy
framework: swiftui
role: symbol
role_heading: Structure
path: swiftui/text/alignmentstrategy
---

# Text.AlignmentStrategy

The way SwiftUI infers the appropriate text alignment if no value is explicitly provided.

## Declaration

```swift
struct AlignmentStrategy
```

## Overview

Overview note: Text tightly wraps its content, so text alignment only affects how lines are positioned relative to each other. The text as a whole needs to be positioned at the view level using Alignment.

## Topics

### Type Properties

- [default](swiftui/text/alignmentstrategy/default.md)
- [layoutBased](swiftui/text/alignmentstrategy/layoutbased.md)
- [writingDirectionBased](swiftui/text/alignmentstrategy/writingdirectionbased.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
