Components
← All components

Scroll Restore

stimeo--scroll-restore

Remembers where you were inside a scrolling box, so leaving and coming back shows the same place.

  • Core
  • Rails / Turbo

Turbo rebuilds the page on every visit, so a scrolling box inside it comes back at the top. This remembers where you were and puts you back there. Within the same tab it survives a full reload too. What it remembers is filed under a name, so several boxes on a page never collide, and you choose whether to remember the vertical position, the horizontal one, or both. It changes nothing for screen readers and nothing visually.

running

Scroll both lists, then press rebuild. The left one returns to where you were and the right one jumps to the top, which is what happens to a scrolling box on a Turbo visit. A real navigation keeps the position too, within the same tab.

With Scroll Restore

  1. Row 1
  2. Row 2
  3. Row 3
  4. Row 4
  5. Row 5
  6. Row 6
  7. Row 7
  8. Row 8
  9. Row 9
  10. Row 10
  11. Row 11
  12. Row 12
  13. Row 13
  14. Row 14
  15. Row 15
  16. Row 16
  17. Row 17
  18. Row 18
  19. Row 19
  20. Row 20

Without (plain)

  1. Row 1
  2. Row 2
  3. Row 3
  4. Row 4
  5. Row 5
  6. Row 6
  7. Row 7
  8. Row 8
  9. Row 9
  10. Row 10
  11. Row 11
  12. Row 12
  13. Row 13
  14. Row 14
  15. Row 15
  16. Row 16
  17. Row 17
  18. Row 18
  19. Row 19
  20. Row 20

Keyboard

This component has no keyboard interactions of its own.