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

# alignment

The alignment mode of the text in the receiver’s cell.

## Declaration

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

## Discussion

Discussion The value of this property can be one of the following constants: NSLeftTextAlignment, NSRightTextAlignment,NSCenterTextAlignment, NSJustifiedTextAlignment, or NSNaturalTextAlignment. The default value is NSNaturalTextAlignment. Setting this property while the cell is currently being edited aborts the edits to change the alignment.

## See Also

### Formatting Text

- [font](appkit/nscontrol/font.md)
- [lineBreakMode](appkit/nscontrol/linebreakmode.md)
- [usesSingleLineMode](appkit/nscontrol/usessinglelinemode.md)
- [formatter](appkit/nscontrol/formatter.md)
- [baseWritingDirection](appkit/nscontrol/basewritingdirection.md)
