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


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


<h2 id="scrolltoindex-label-action">scrollToIndex</h2>

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


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


Action to scroll a container to the index of one of its items.

The `action` should throw an `IllegalArgumentException` if the index is out of bounds.