Scroll Snapping

Auto-alignment after scroll
Demonstrates the built-in snap feature. When scrolling stops, the view automatically smooth-scrolls to align with the nearest item. Useful for carousels, page-by-page navigation, or pickers.
Note: Snapping is disabled if the item is larger than the viewport.
Item Height300px
1
Page 1
Scroll, then release to snap
2
Page 2
Scroll, then release to snap
3
Page 3
Scroll, then release to snap
4
Page 4
Scroll, then release to snap
5
Page 5
Scroll, then release to snap
  • Scroll Status
  • Direction
    vertical
  • Current Item #
    -
  • Rendered Range #
    0:0
  • Total Size (px)
    0w ×0h
  • Viewport Size (px)
    0w ×0h
  • Scroll Offset (px)
    0x ×0y
  • Controls