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


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


<h2 id="settext-label-action">setText</h2>

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


```kotlin
fun SemanticsPropertyReceiver.setText(
    label: String? = null,
    action: ((AnnotatedString) -> Boolean)?,
)
```


Action to set the text contents of this node.

Expected to be used on editable text fields.

#### Parameters

| | |
| --- | --- |
| label | Optional label for this action. |
| action | Action to be performed when `SemanticsActions.SetText` is called. |