androidx.compose.material3

FloatingToolbarScrollBehaviorSince 1.10

Sealed interface

No hand-written docs yet.

A FloatingToolbarScrollBehavior defines how a floating toolbar should behave when the content under it is scrolled.

sealed interface FloatingToolbarScrollBehavior : NestedScrollConnection

Is a

How to get one

Ready-made values and functions that return it

Used by

Parameters that take a FloatingToolbarScrollBehavior.

Properties

exitDirection

val exitDirection: FloatingToolbarExitDirection

Indicates the direction towards which the floating toolbar exits the screen.

state

val state: FloatingToolbarState

A FloatingToolbarState that is attached to this behavior and is read and updated when scrolling happens.

snapAnimationSpec

val snapAnimationSpec: AnimationSpec<Float>

An AnimationSpec that defines how the floating toolbar snaps to either fully collapsed or fully extended state when a fling or a drag scrolled it into an intermediate position.

flingAnimationSpec

val flingAnimationSpec: DecayAnimationSpec<Float>

An DecayAnimationSpec that defines how to fling the floating toolbar when the user flings the toolbar itself, or the content below it.

Functions

floatingScrollBehavior

fun Modifier.floatingScrollBehavior(): Modifier

A Modifier that is attached to this behavior.

Library docs

A FloatingToolbarScrollBehavior defines how a floating toolbar should behave when the content under it is scrolled.