Components
← All components

Reading Progress

stimeo--reading-progress

Publishes how far the reader has scrolled through an article as a CSS custom property.

  • Core

The stimeo--reading-progress controller measures how far the reader has scrolled *through* the element (0..1) and publishes it as the --stimeo--reading-progress custom property — on the element and on the document root, so a fixed bar anywhere in the page can consume it with pure CSS. IntersectionObserver alone cannot express this (the ratio stays constant while a tall article scrolls through the viewport), so this controller owns the scroll math, rAF-throttled, listening in the capture phase so articles inside overflow containers work too. change fires as the progress moves and complete once it reaches 1. The bar itself is the consumer's CSS; mark a decorative bar aria-hidden (a semantic progress belongs to stimeo--progress).

running

Scroll this page — the sticky bar above the article fills from the CSS variable alone (no consumer JS).

Paragraph 1: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 2: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 3: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 4: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 5: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 6: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 7: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 8: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 9: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 10: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 11: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 12: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 13: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.

Paragraph 14: scroll on — the bar above tracks how far through this article you are, computed from the article's geometry and published as a CSS custom property.