inspired by the sidebars on recent.design and gustavo fior’s craft. recent places a dot after the current label, so changing sections moves it sideways as well as down. craft puts it before the label and shifts the selected text to make room. both make a few pixels do the work of a whole highlighted row.
the arc and the handover
this version measures the actual label and sends one dot along an arc whose width grows with the distance between entries. a neighbouring row gets a small curve; a jump across groups takes a wider path. the incoming dot nudges the selected label aside as it arrives, while the old label springs home.
changing your mind mid-flight carries the dot’s position and velocity into the next arc. switching its placement takes it over the active label while the text settles into its new position.
selection that stays yours
hover never steals the current page: it only changes the label colour, while keyboard focus has its own outline and enter moves the dot immediately. a resize observer and a font-ready measurement keep it attached after the layout changes, and reduced motion makes every move immediate. these are ordinary links with aria-current, so the example can hand selection to a router without becoming a custom tab widget.
take it with you
three steps, and the stage above runs in your own project.
install
nothing to add. it runs on react alone, 18 or newer.
copy
4 files, kept together in one folder, dot-navigation/. the styles travel with them.