Defines how to scroll the scrollable component

Summary

Public functions

Float
maxScrollOffset(containerSize: Int)

Maximum scroll offset of the content inside the scrollable component

android
suspend Unit
scrollTo(containerSize: Int, scrollOffset: Float)

Instantly jump to scrollOffset in pixels

android

Public properties

Float

Scroll offset of the content inside the scrollable component.

android

Public functions

maxScrollOffset

fun maxScrollOffset(containerSize: Int): Float

Maximum scroll offset of the content inside the scrollable component

Parameters
containerSize: Int

size of the scrollable component (for example, it is height of ScrollableColumn if we use VerticalScrollbar)

scrollTo

suspend fun scrollTo(containerSize: Int, scrollOffset: Float): Unit

Instantly jump to scrollOffset in pixels

Parameters
containerSize: Int

size of the scrollable container (for example, it is height of ScrollableColumn if we use VerticalScrollbar)

scrollOffset: Float

target value in pixels to jump to, value will be coerced to 0..maxScrollOffset

Public properties

scrollOffset

val scrollOffsetFloat

Scroll offset of the content inside the scrollable component. Offset "100" means that the content is scrolled by 100 pixels from the start.