---
title: NSRectAlignment
framework: appkit
role: symbol
role_heading: Enumeration
path: appkit/nsrectalignment
---

# NSRectAlignment

Constants that specify alignment to an edge or a set of edges depending on the user interface layout direction.

## Declaration

```swift
enum NSRectAlignment
```

## Topics

### Alignments

- [NSRectAlignment.none](appkit/nsrectalignment/none.md)
- [NSRectAlignment.top](appkit/nsrectalignment/top.md)
- [NSRectAlignment.topLeading](appkit/nsrectalignment/topleading.md)
- [NSRectAlignment.leading](appkit/nsrectalignment/leading.md)
- [NSRectAlignment.bottomLeading](appkit/nsrectalignment/bottomleading.md)
- [NSRectAlignment.bottom](appkit/nsrectalignment/bottom.md)
- [NSRectAlignment.bottomTrailing](appkit/nsrectalignment/bottomtrailing.md)
- [NSRectAlignment.trailing](appkit/nsrectalignment/trailing.md)
- [NSRectAlignment.topTrailing](appkit/nsrectalignment/toptrailing.md)

### Initializers

- [init(rawValue:)](appkit/nsrectalignment/init(rawvalue:).md)

## Relationships

### Conforms To

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

## See Also

### Related types

- [NSDirectionalEdgeInsets](appkit/nsdirectionaledgeinsets.md)
- [NSDirectionalRectEdge](appkit/nsdirectionalrectedge.md)
