SearchBarScrollBehavior

@Stable
interface SearchBarScrollBehavior

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

See also

Properties

Link copied to clipboard
@get:FrequentlyChangingValue
abstract var contentOffset: Float

The total offset of the content scrolled under the search bar.

Link copied to clipboard
abstract val nestedScrollConnection: NestedScrollConnection

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

Link copied to clipboard
@get:FrequentlyChangingValue
abstract var scrollOffset: Float

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.

Link copied to clipboard
abstract var scrollOffsetLimit: Float

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

Functions

Link copied to clipboard
abstract fun Modifier.searchBarScrollBehavior(): Modifier

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