---
title: "DisableSelection"
description: "Disables text selection for its direct or indirect children. To use this, simply add this to wrap
one or more text composables."
type: "composable"
---

<div class='type'>Composable Function</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@Composable
fun DisableSelection(content: @Composable () -> Unit)
```


Disables text selection for its direct or indirect children. To use this, simply add this to wrap
one or more text composables.




## Code Examples
### DisableSelectionSample
```kotlin
@Composable
fun DisableSelectionSample() {
    SelectionContainer {
        Column {
            Text("Text 1")
            DisableSelection {
                Text("Text 2")
                Text("טקסט 3")
            }
            Text("Text 3")
        }
    }
}
```

