---
title: "onClick"
description: "Action to be performed when the node is clicked (single-tapped)."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


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


Action to be performed when the node is clicked (single-tapped).

#### Parameters

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




