07.1Block 07.1 · Long reads
Reading Progress
A long read with a test tube for a progress bar. The tube in the margin fills with ink as the essay is read, and sloshes when the reader skims.
- Version
- 0.1.0
- Size
- 99.0 KB gzipped
- Access
- With a Pass
- Needs
- reading-progress.mjs + reading-progress.css · Vessel
- Tests
- 8 tests · 10 states
On this page
Use it
Make reading progress something the reader has filled: for a long-read article, an essay, documentation or a case study, the share read is a volume of liquid in a vessel that belongs to the piece, with the minutes left and the sections beside it, measured through the article itself, in the page or inside any scrolling panel.
Copy the reading-progress folder and the vessel folder from its package next to your page, link the stylesheets and mount it on an element. Every option has a default; the lab’s Code tab writes the same example at any settings, and for React, Vue, Svelte or a custom element (Using a framework).
<link rel="stylesheet" href="vessel/vessel.css">
<link rel="stylesheet" href="reading-progress/reading-progress.css">
<div id="reading-progress"></div>
<script type="module">
import Vessel from './vessel/vessel.mjs';
import { mount } from './reading-progress/reading-progress.mjs';
const readingProgress = mount(document.getElementById('reading-progress'), {
journal: 'Soft Point',
issue: 'No. 14 · Autumn 2026',
kicker: 'Essay · Materials',
}, { Vessel });
// readingProgress.update({ … }); change any option in place
// readingProgress.destroy(); and take it away again
</script>Options
| Option | Type | Default | What it does |
|---|---|---|---|
| journal | text | 'Soft Point' | Journal |
| issue | text | 'No. 14 · Autumn 2026' | Issue line |
| kicker | text | 'Essay · Materials' | Kicker |
| title | text | 'Thin Walls' | Title |
| dek | text | 'The test tube is the humblest thing on the bench and one of the most carefully made. How glass was taught to survive the flame.' | The standfirst under the title. |
| author | text | 'Iris Calloway' | Author |
| date | text | '27 September 2026' | Date |
| palette | paper · night | 'paper' | Uncoated paper and blue-black ink, or the same page read at night. |
| liquid | auto · ink · water · signal · honey | 'auto' | Auto: ink on paper, water at night. |
| figure | boolean | true | The tube drawn to scale, with its dimensions. |
| slosh | number, 0 to 2 | 1.2 | How hard a flick of the wheel throws the liquid. |
| light | number, 0 to 345 | 315 | Light from (degrees) |
| wpm | number, 120 to 400 | 230 | For the reading time and the minutes left. |
Methods
mount(element, options, { Vessel })- Builds the block inside the element and returns its handle. Hand it the Vessel it is built with.
handle.vesselhandle.update(next = {})- Change options in place.
handle.destroy()- Stops it and cleans up after it.
States
- Top of the essayThe tube is empty; “0% read”, “3 min left”; the opening is marked in the section list.
- ReadingAs the body passes through the view the tube fills to the share read, a thin stream pouring while it rises; the words and the section list follow.
- SkimmingA fast flick of the wheel throws the ink against the wall; it sways back and settles, and the tube's loop sleeps.
- FinishedThe tube is full, “100% read”, “Finished”, the last section marked; an end mark and the author's note follow.
- Inside a panelMounted in any scrolling container (or a frame scaled by a transform) it reads that container, and the rail sticks to its top.
- PalettePaper (uncoated stock, blue-black ink in the tube) or night (warm grey on near-black, water in the tube); the glass re-shades itself for the page.
- TabletA 64px rail with only the tube and the percentage; nothing hangs into the margin.
- PhoneOne column; the tube, the percentage and the minutes left become a card pinned to the foot of the view while the essay is on screen.
- Reduced motionThe tube shows the true level with no pour and no slosh; every number and the section list still follow the reading.
- Off screenThe tube's loop pauses; nothing else runs: one animation frame per burst of scrolling updates the words.
How it works
Made of: Element tracked reading progress, Sticky margin rail, Container query layout, Section tracking, Scroll jolt slosh, Palette tokens from one table.
Original composition. The journal “Soft Point”, its author and the essay are written for this block; the essay's history (Schott in Jena in the 1880s, borosilicate, Pyrex in 1915, lampworking and annealing) is stated as commonly told. Imagery is an SVG figure drawn to scale and the Vessel's canvas; no photograph. Faces: Gloock and Lora (SIL OFL 1.1), Latin subsets as WOFF2.
Built with
More blocks on the same object:
- 06.4Specimen CaseA bento of glass-topped compartments in a machined case, each holding one real Tactile object running small (the Odometer, the Flip-Dot, the Detent Dial, the Vessel) with an engraved label card under the glass.
- 07.2Crowdfund FlaskA fundraiser where the total is honey in a flask.
- 07.3Upload VesselA file-import dialog where the upload fills a beaker.