---
title: "isRoot"
description: "Return whether the node is the root semantics node.

There is always one root in every node tree, added implicitly by Compose."
type: "function"
---

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


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


```kotlin
fun isRoot() = SemanticsMatcher("isRoot") { it.isRoot }
```


Return whether the node is the root semantics node.

There is always one root in every node tree, added implicitly by Compose.



