<scroll-view>
A container that scrolls, like a <div> with overflow: auto. It renders all its children at once, so use <list> for long lists.
Usage
Import LYNX_ELEMENTS in your component (see Elements).
A <scroll-view> without a fixed height grows to fit its content and never scrolls. flex: 1 on it isn't enough: put flex: 1 on a parent column and give the scroll view height: 100%.
Attributes
Plus the common attributes, such as id, class and style.
Events
Read the payload from $event.detail. Angular types $event for each event: see Element events.
Plus the common events, such as bindtap.
Methods
These UI methods (Glossary) scroll it from code. Call them with invoke() on the element (see Call element methods). A call from a handler returns nothing: to read a result, call invoke() in a main-thread script instead. To bring one child into view, call scrollIntoView on that child.
Related
<list>: virtualized scrolling for long lists<scroll-coordinator>: a list under a collapsing header. Nested scroll views don't hand scrolling to each other.- CSS on Lynx: heights,
position: stickyandz-indexinside a scroll view - Scroll Area: the UI component built on it
