<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TextSelectability/enabled",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI17TextSelectabilityPA2A07EnabledcD0VRszrlE7enabledAEvpZ"
  },
  "title" : "enabled"
}
-->

# enabled

A selectability value that enables text selection by a person using your app.

```
@export(implementation) static var enabled: EnabledTextSelectability { get }
```

## Discussion

Enabling text selection allows people to perform actions on the text
content, such as copying and sharing. Enable text selection in views
where those operations are useful, such as copying unique IDs or
error messages. This allows people to paste the data into
emails or documents.

The following example enables text selection on the second of two
[`Text`](/documentation/SwiftUI/Text) views in a [`VStack`](/documentation/SwiftUI/VStack).

```
VStack {
    Text("Event Invite")
        .font(.title)
    Text(invite.date.formatted(date: .long, time: .shortened))
        .textSelection(.enabled)
}
```

---

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)