VisibilityState

Describes the visibility behavior of a UI element that can be shown or hidden based on scroll position or other conditions.

Used by components like StylishHeader, StylishFab, and StylishFooter to control when they appear or disappear in response to user interaction.

See also

Inheritors

Types

Link copied to clipboard

The element is always hidden, regardless of scroll position or other conditions.

Link copied to clipboard

The element is always visible, regardless of scroll position or other conditions.

Link copied to clipboard
class NestedScrollAware(val nestedScrollConnection: NestedScrollConnection) : VisibilityState

The element's visibility is determined by a NestedScrollConnection.

Link copied to clipboard
class ScrollAware(val scrollState: ScrollState, val threshold: Dp = 48.dp) : VisibilityState

The element's visibility is determined by the scroll position of a ScrollState.

Functions

Link copied to clipboard

Returns the current visibility state as a boolean, observing any reactive sources (such as VisibilityState.ScrollAware.scrollState) as needed.