Scroll rail

A long list in miniature down its edge: a dash per item in its state’s colour, swelling under the pointer.

Beside a run

Run the pointer down the rail: the dashes swell under it and the waypoint at the crest is named. Click to jump.

  1. 1 Stokks.1 Done
  2. 2 Stokks.3 Done
  3. 3 General task Done
  4. 4 FN 13 (O-4) Done
  5. 5 Bømlo S Done
  6. 6 S8 Done
  7. 7 OH-12 Deviation
  8. 8 Refuelling Done
  9. 9 St.3 Done
  10. 10 Langn. Done
  11. 11 Fitjar Done
  12. 12 Vikafjord Done
  13. 13 S12 Done
  14. 14 OH-14 Done
  15. 15 St.7 Done
  16. 16 Rubbestad Under way
  17. 17 Hiskjo Next
  18. 18 S15 Next
  19. 19 Ølen Next
  20. 20 Skånevik Next
  21. 21 OH-18 Next
  22. 22 Etne Next
  23. 23 St.11 Next
  24. 24 Sydnes Next
  25. 25 Halsnøy Next
  26. 26 S20 Next
  27. 27 Ålfjorden Next
  28. 28 Bjoa Next
<div class="flex gap-4">
	<ol>{#each waypoints as w}<li id={w.id} class="scroll-mt-20">…</li>{/each}</ol>
	<ScrollRail class="sticky top-16" offset={80}
		items={waypoints.map((w) => ({ id: w.id, label: w.name, status: w.status }))} />
</div>

Rules

  • For a long list of like things with a state each. Under about fifteen, the list itself is enough.
  • At the list’s edge, sticky, on the right; the names open to the left.
  • Only states that mean something get colour: done, a problem, under way. The rest stay grey.
  • The rail is one stop for Tab: the arrows move the crest, Enter jumps.
  • Point at it and the dashes swell like a dock: full length under the pointer, half for the neighbours, tapering off.