Whether text selection is enabled or disabled.
Enables or disables user text selection.
.textSelection(mode: "enabled" | "disabled"): Component
Text("You can select and copy this text.")
.textSelection("enabled")
Text("This text cannot be selected.")
.textSelection("disabled")
VStack({ alignment: "leading", spacing: 8 }, [
Text("Article Title")
.font("title")
.textSelection("disabled"),
Text("This is the body of the article. Users can select and copy this content for sharing.")
.textSelection("enabled"),
])