Skip to main content

scroll_offset

Function scroll_offset 

Source
pub fn scroll_offset(ident: impl Into<Ident>, cx: &mut App) -> Point<Pixels>
Expand description

How far the region with this identity has been scrolled, in pixels down and across from the start of its content.

This is what a scroll-linked value reads: pair it with ScrollLink to collapse a header or fade a heading as the content moves under it. A region that has never rendered reports zero, which is where it will be when it does.