Scroll Indicator for Bricks
Shows how far a visitor has scrolled, as a progress bar or a ring. The bar can have a dot for each section that links to it, and the ring can double as a back-to-top button.
Adding one
Add Scroll Indicator to the page (General) and choose Bar or Ring. Put it in a header or footer template to show it on every page. A bar is fixed to the top of the screen by default, and a ring sits in the bottom right corner and appears after 300px of scrolling.
What it measures
By default, progress through the whole page. To measure just one part, such as an article, enter a CSS selector in Measure progress through, for example .entry-content. It starts when that part reaches the top of the screen and finishes when its end reaches the bottom.
The bar
- Fixed to the top or bottom of the screen, or placed inline where you drop it.
- Thickness, width (placed bars), rounded ends, colour or a CSS gradient, and track colour.
Section dots
Tick Show a dot for each section and give a CSS selector for the sections, such as h2. Each dot sits where its section starts along the bar and scrolls smoothly to it when clicked.
- A section is named from its text. Add a
data-sifb-labelattribute to use something shorter. - Names show on hover, below, above, or never.
- Three colours: the normal dot, dots the progress has passed, and the current section. The current one is also marked with
aria-current.
The ring
- Bottom right, bottom left, top right, top left, or placed inline.
- Size, line thickness, solid, dashed or dotted track, round or flat ends, and colours.
- The middle shows the percentage, a back-to-top arrow, or nothing. With the arrow the ring becomes a button that scrolls to the top.
Showing and hiding
- Appear after scrolling: fixed indicators stay hidden until the visitor has scrolled that far.
- Hide on screens narrower than 480, 640, 768 or 992px.
Accessibility
- The bar and the ring are announced as a progress bar named Page progress (change the name if you like), with a value from 0 to 100 that updates whole percent at a time.
- Section dots are a navigation landmark named Sections, and every dot is a real link.
- The back-to-top ring is a real button. With reduced-motion settings, scrolling jumps instead of gliding and the animation is turned off.
Good to know
- On a page with the WordPress admin bar showing, a top bar sits just below it.
- Dots are placed after the page loads and again when the window is resized. If your sections change height later (such as accordions opening), resizing the window refreshes them.
- In the builder the indicator is shown in place with some progress, so you can style it.