<!--
{
  "availability" : [
    "macOS: 12.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextSelectionNavigation/Direction",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTextSelectionNavigationDirection"
  },
  "title" : "NSTextSelectionNavigation.Direction"
}
-->

# NSTextSelectionNavigation.Direction

Values that describe the direction of a selection.

```
enum Direction
```

## Topics

### Navigation directions

[`case forward`](/documentation/AppKit/NSTextSelectionNavigation/Direction/forward)

The value that represents a logical forward selection based on the flow of text stored in the document.

[`case backward`](/documentation/AppKit/NSTextSelectionNavigation/Direction/backward)

The value that represents a backward selection based on the flow of text stored in the document.

[`case left`](/documentation/AppKit/NSTextSelectionNavigation/Direction/left)

The value that represents a selection in the left direction along the current line.

[`case right`](/documentation/AppKit/NSTextSelectionNavigation/Direction/right)

The value that represents a selection in the right direction along the current line.

[`case up`](/documentation/AppKit/NSTextSelectionNavigation/Direction/up)

The value that represents a selection in the up direction, above the current line.

[`case down`](/documentation/AppKit/NSTextSelectionNavigation/Direction/down)

The value that represents a selection in the down direction, below the current line.

### Initializers

[`init?(rawValue: Int)`](/documentation/AppKit/NSTextSelectionNavigation/Direction/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)