---
title: alignment
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstext/alignment
---

# alignment

The alignment of all the receiver’s text.

## Declaration

```swift
var alignment: NSTextAlignment { get set }
```

## Discussion

Discussion The value of  mode must be one of the alignments described in NSTextAlignment. Text using NSNaturalTextAlignment is actually displayed using one of the other alignments, depending on the natural alignment of the text’s script.

## See Also

### Setting text alignment

- [alignCenter(_:)](appkit/nstext/aligncenter(_:).md)
- [alignLeft(_:)](appkit/nstext/alignleft(_:).md)
- [alignRight(_:)](appkit/nstext/alignright(_:).md)
