Skip to content

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 Description Source
component.readProgressBar.css All progress bar styles (.readProgressBar) Github

HTML

Custom properties

The following custom properties are available in theme.default.ui.css:

Property Description
--readProgressBar-height Progress bar height.
--readProgressBar-color Progress bar background color.

Examples