---
title: "getScrollViewportLength"
description: "Action to get a scrollable's active view port amount for scrolling actions."
type: "function"
---

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


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


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


Action to get a scrollable's active view port amount for scrolling actions.

#### Parameters

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




