SearchBarScrollBehavior


A SearchBarScrollBehavior defines how a search bar should behave when the content beneath it is scrolled.

Summary

Public functions

Modifier

The modifier that adds scrolling behavior to the search bar component.

Cmn

Public properties

NestedScrollConnection

A NestedScrollConnection that should be attached to a Modifier.nestedScroll in order to keep track of scroll events.

Cmn
Float

The search bar's current offset due to scrolling, in pixels.

Cmn
Float

The limit that a search bar can be offset due to scrolling, in pixels.

Cmn

Public functions

searchBarScrollBehavior

fun Modifier.searchBarScrollBehavior(): Modifier

The modifier that adds scrolling behavior to the search bar component. TopSearchBar applies this automatically.

Public properties

nestedScrollConnection

val nestedScrollConnectionNestedScrollConnection

A NestedScrollConnection that should be attached to a Modifier.nestedScroll in order to keep track of scroll events.

scrollOffset

var scrollOffsetFloat

The search bar's current offset due to scrolling, in pixels. This offset is applied to the fixed size of the search bar to control the displayed size when content is being scrolled.

This value is typically negative.

Updates to the scrollOffset value are coerced between scrollOffsetLimit and 0.

scrollOffsetLimit

var scrollOffsetLimitFloat

The limit that a search bar can be offset due to scrolling, in pixels.

This value is typically negative.

Use this limit to coerce the scrollOffset value when it's updated.