jump line
a line of anchors to a long page's sections, each with how many it holds, so the head of the page says what's on it.
bunx --bun shadcn@latest add @mk/jump-lineserves quanta, trisys, and orbit.
example
each name jumps to its section, and the figure beside it prints muted in mono. the dots between the names are decoration, so a screen reader reads a list of links.
states
hover underlines the name and leaves the figure alone, and keyboard focus draws the control ring. while a filter holds the page, drop count, since the figure would no longer say what the section shows.
rest
name and figure
hover
the name underlines
focus
2 px house ring
filtered
no figures
rest
name and figure
hover
the name underlines
focus
2 px house ring
filtered
no figures
on a phone
at 600 px and below, the line drops its dots and each link holds a 44 px row, so the wrapped lines stay easy to hit. a name wider than the line wraps, with its figure after its last word. both frames use a 390 px viewport.
parts
JumpLine- the nav. it names itself
on this page, andaria-labelgives it another name. JumpLineLink- one anchor.
countprints after the name, andrendertakes the app’s router link. leave out a section’s link and its dot goes with it.