---
title: NSSelectionGranularity
framework: appkit
role: symbol
role_heading: Enumeration
path: appkit/nsselectiongranularity
---

# NSSelectionGranularity

These constants specify how much the text view extends the selection when the user drags the mouse. They’re used by selectionGranularity, and selectionRange(forProposedRange:granularity:):

## Declaration

```swift
enum NSSelectionGranularity
```

## Topics

### Constants

- [NSSelectionGranularity.selectByCharacter](appkit/nsselectiongranularity/selectbycharacter.md)
- [NSSelectionGranularity.selectByWord](appkit/nsselectiongranularity/selectbyword.md)
- [NSSelectionGranularity.selectByParagraph](appkit/nsselectiongranularity/selectbyparagraph.md)

### Initializers

- [init(rawValue:)](appkit/nsselectiongranularity/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

### Constants

- [NSSelectionAffinity](appkit/nsselectionaffinity.md)
- [NSFindPanelAction](appkit/nsfindpanelaction.md)
- [Input Sources Locale Identifiers](appkit/input-sources-locale-identifiers.md)
- [Find Panel Search Metadata](appkit/find-panel-search-metadata.md)
- [NSFindPanelSubstringMatchType](appkit/nsfindpanelsubstringmatchtype.md)
