Skip to content
Calm motion: animations on this site only fade, with no movement

Reading progress ​

A thin bar that fills as the reader scrolls an article

Shows how much of a long article is behind the reader, and how many minutes are left. Put it once on the page of an article. For the progress of a task, use the progress bar.

Basic

Sound on a small budget

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

A quiet room matters more than an expensive microphone. Hard walls send the voice back, and the microphone hears the echo a moment later. Soft things break up that echo: curtains, a sofa, a full bookshelf, or a wardrobe of clothes. Before you buy anything, record one minute in each room of your home and listen with headphones. Pick the room with the least echo, and put the microphone close to your mouth, about one hand away.

  • With no target, the bar follows the scroll of the whole page, at the top of the window.
  • Set target to the article, as an element or a CSS selector, to follow only that part of the page. If the target scrolls by itself, as in the example, the bar follows the scroll of the target.
  • position is fixed (default) at the top of the window, or sticky at the top of the box that holds the bar.
  • minutes shows the minutes left under the end of the bar. The count uses the words in the target and wpm, the words that a reader reads in a minute (default 230).
  • At the end of the article, the bar emits finish once.
  • Set the height of the bar with the --bless-reading-height CSS variable (default 3px). The bar is a progress bar for screen readers. Change the words with labels or a label pack: label, and left (a function of the minutes).

Usage ​

ts
import { BlessReadingProgress } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
targetstring | HTMLElement—the article: an element or a CSS selector. A box that scrolls by itself is read by its own scroll. Default: the page.
position"fixed" | "sticky""fixed"`fixed` sits at the top of the window; `sticky` sits at the top of the box it is in
minutesboolean—show the minutes left at the end of the bar
wpmnumber230words a minute of a reader, for the minutes left
labelsPartial<{ label: string; left: (minutes: number) => string; }>—

Events

NamePayloadDescription
finish[]

Released under the MIT License. Character names and artwork belong to their owners.