← All elements
<nav class="vr" aria-label="Page sections"><a href="#">Intro</a><a href="#">Setup</a><a href="#" aria-current="true">Styling</a><a href="#">Testing</a><a href="#">Release</a></nav>About this navigation bar
A side rail of dots with labels that marks the current section and fills the line down to it.
How it works
Each link draws its own dot and the line segment below it. The link marked with aria-current gets a halo, and sibling selectors turn every dot, line and label after it grey. Moving the attribute is all it takes to move the progress.
Ways to customise it
- Move aria-current to another link.
- Change #4f46e5 to your colour.
- Change the vertical padding to space the steps.
Good to know
The attribute tells screen readers which section is current. Updating it as the reader scrolls needs a small script or server-side rendering.
Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.