---
title: allowsSelection
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/textselectability/allowsselection
---

# allowsSelection

A Boolean value that indicates whether the selectability type allows selection.

## Declaration

```swift
static var allowsSelection: Bool { get }
```

## Discussion

Discussion Conforming types, such as EnabledTextSelectability and DisabledTextSelectability, return true or false for this property as appropriate. SwiftUI expects this value for a given selectability type to be constant, unaffected by global state.
