---
title: "collapse"
description: "Action to collapse an expandable node."
type: "function"
---

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


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


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


Action to collapse an expandable node.

#### Parameters

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




