current theme: placeholder

component :: Read Progress Bar

The .readProgressBar component creates a reading progress bar at the top of the page that represents the user’s scroll position, growing as the user scrolls down and decreasing as they scroll up. This helps users understand their progress through the content and how much remains to be read. This component uses pure CSS when supported by the browser, and has a polyfill for browsers that don’t support animation-timeline.

(Scroll this page to see the component in action.)

File NameclassSource
component.ReadProgressBar.css.readProgressBarGithub

HTML

Custom properties

The following custom properties are available in the default theme:

PropertyDescription
--readProgressBar-heightProgress bar height.
--readProgressBar-colorProgress bar background color.

Examples