androidx.compose.foundation

ScrollIndicatorStateSince 1.10

Interface · from org.jetbrains.compose.foundation:foundation:1.12.2

No hand-written docs yet.

Represents the state required to draw a scroll indicator (e.g., a scrollbar), which is typically provided by a scrollable component.

interface ScrollIndicatorState

How to get one

Ready-made values and functions that return it

Used by

Parameters that take a ScrollIndicatorState.

Properties

scrollOffset

val scrollOffset: Int

The current scroll offset of the content from the visual start of the container, typically in pixels.

contentSize

val contentSize: Int

The total size of the scrollable content, typically in pixels.

viewportSize

val viewportSize: Int

The size of the visible portion of the scrollable content, typically in pixels.

Library docs

Represents the state required to draw a scroll indicator (e.g., a scrollbar), which is typically provided by a scrollable component.

For scrollable components with a large number of items, such as lazy layouts, implementations may need to provide a reasonable heuristic for properties like scrollOffset and contentSize, as calculating the exact value might be computationally expensive or impossible.