Expand description
Scroll state and node implementation for cranpose.
This module provides the core scrolling components:
ScrollState: Holds scroll position and provides scroll control methodsScrollNode: Layout modifier that applies scroll offset to contentScrollElement: Element for creating ScrollNode instances
The actual Modifier.horizontal_scroll() and Modifier.vertical_scroll()
extension methods are defined in modifier/scroll.rs.
Structs§
- Scroll
Element - Element for creating a ScrollNode.
- Scroll
Node - ScrollNode layout modifier that physically moves content based on scroll position. This is the component that actually reads ScrollState and applies the visual offset.
- Scroll
State - State object for scroll position tracking.
Type Aliases§
- Scroll
Settle Policy - Remaps where a scroll comes to rest once the user’s interaction ends — the
UIScrollView targetContentOffsetanalog. Receives the naturally proposed rest offset (the fling’s predicted end, or the current offset for a plain release/wheel idle) and the release velocity in offset units/sec; returns the offset the scroll should settle at. Used e.g. by the liquid nav bar to snap out of the large-title collapse band so the title never rests half-faded.