shadcn.io is not affiliated with official shadcn/ui
Scroll Progress Ruler Track Features Block for React
A features section for an analytics SDK: a sticky ruler of six anchor-link ticks that follows six full sections as you scroll, lighting the tick of the section on screen with a sliding thumb.
Installation
Overview
A features section for React with Base UI, built around a ruler that follows the page. Under a compact header, a band of six ticks (install, capture, identify, funnels, privacy and export), each an anchor link, sticks to the top of the screen while six sections scroll beneath it. The section on screen lights its tick, and a thumb slides along the ruler to it. Each section is a number, a title, a sentence and one figure, with a small greyscale drawing of the feature beside them from md up. The ruler is a table of contents, so a click jumps to a section and the keyboard works as it does on any outline. It's built from Table of Contents (Toc) and the Guides line kit, with your theme's tokens for every colour and no button. For long product tours, SDK walkthroughs and any page where people want to know how far along they are.
FAQ
How do I change the sections?
Edit the six stop objects at the top of the file: each has a number, a name for the ruler, a heading, a sentence, a figure with its label and an anchor id. The ruler's items are built from the same list, and each section's heading carries that id, so a link and its section can't come apart. A drawing is a small component beside them; pass your own as the section's child.
How does the ruler know which section is on screen?
The Toc component watches the headings with an intersection observer, in a band a little below the top of the screen (its rootMargin). The tick of the heading in that band is marked active, and the thumb is placed from the active link's position, so it follows the section even when the window is resized. With reduced motion the thumb jumps instead of sliding.
Can it sit under a fixed header?
Yes. The ruler is sticky at the top of the screen; if your page has a fixed navigation bar, change top-0 on the ruler to the bar's height, and raise the scroll-mt-24 on each heading by the same amount so a jump doesn't hide the title behind the ruler.
How does it work from the keyboard?
The ticks are plain links in a navigation landmark named "Stops": Tab moves along them, and Enter jumps to the section. There's no custom key handling, so it behaves like any table of contents.
Related
- Pro
Chapter Outline Features
Documents and objectsA course outline laid out like a book's contents: eight numbered chapters in two ruled columns, each a collapsible row that opens to three sections, with read times and the reader's place.
- Pro
Glossary Term Grid Features
Documents and objectsA glossary: an A to Z rail of anchor links where only letters with a term are active, and eight terms in two columns of shared hairlines, each with its part of speech, a definition and a See also link.
- Pro
Alternating Stripe Sections Features
Alternating rowsThree tinted stripes for a CI platform: pipeline runs beside their copy, an environments table beside its copy, then a centred statement over a three-cell grid of build figures.
- Pro
Timeline Evolution Story Features
Timelines and stepsA features section that tells five years of an edge runtime as year tabs on one rail: what shipped, a cold start before and after in rolling digits, and a five-bar history of regions.
- Pro
Sequential Milestone Checklist Features
Timelines and stepsA features section for a launch-readiness tool: five milestones in an accordion, each a grouped checklist of real checkboxes, with every milestone locked until the one before it is complete.
- Pro
Agenda Hour Timeline Features
Timelines and stepsA day view for a team planner: three features as a numbered list beside a framed 9 to 5 day with events placed by time and a Now line with a pulsing dot.