A quiet breathing pacer: coherence breathing, box breathing, 4-7-8 breathing, and the Wim Hof method.
Live at ryanarnaudin.com/sites/breathe/
Two files, no dependencies, no build step, no network. It is a guided timer rather than a reading page: you set a length, press Begin, and follow an orb that swells and settles with the breath.
Open ryanarnaudin.com/sites/breathe/, pick a practice, and press Begin.
To run it locally instead, open index.html in a browser. Double-click works,
because the fonts are embedded rather than fetched. Keep fonts.css next to it.
Or serve the folder if you prefer a URL:
python3 -m http.server 8000- Four practices (coherence, box, 4-7-8, and Wim Hof), each with its own controls.
- A pacing orb that grows on the inhale and shrinks on the exhale, ringed by a progress arc. The orb shifts color by phase: blue while breathing in, green while breathing out, sand while holding.
- Whole breaths, always. You set a total time and the app rounds up to the next complete cycle rather than cutting one short, so a five minute session at 5.5 seconds in and out actually runs 28 breaths, or 5:08. The real figure is shown before you start.
- Guidance that changes with the phase, one line at a time, in the space the options leave behind once a session starts.
- Synthesized sound. No audio files; bells and an optional drifting tone are generated in the browser.
- A session count kept locally, shown in the header and on the closing screen.
Mid-session the options step aside for the guidance line. Both share one cell, so the orb never moves when a session starts:
Equal, slow breathing at five to six breaths a minute. The default of 5.5 seconds in and 5.5 out is the common resonance rate; 4 in and 6 out lengthens the exhale if you want the calming bias.
| Seconds in · out | What it gives |
|---|---|
| 4 · 4 | brisk, easy to hold |
| 5 · 5 | six breaths a minute |
| 5.5 · 5.5 | the default resonance rate |
| 6 · 6 | five breaths a minute |
| 4 · 6 | longer exhale |
| Custom | 1 to 20 seconds each side |
Four equal sides: in, hold, out, hold. Presets run 3, 4, 5, and 6 seconds. Custom takes all four numbers separately, and a hold set to zero is skipped entirely, so 4 · 0 · 6 · 0 gives you a plain long-exhale pattern.
Both of the above take a session length from 1 minute up to an hour.
In through the nose for four counts, hold for seven, out through the mouth for eight. A short opening phase has you empty the lungs first. Sessions are counted in breaths rather than minutes, since the usual advice is to start with four and work up to eight.
| Setting | Options |
|---|---|
| Breaths | 4, 6, 8 |
| Pace | Slow (1.25s a count), Standard (1s), Quick (0.75s) |
The pattern is fixed and the pace stretches the count, so the clock reads 4, 7, 8 at every pace. Quick is there if the seven-count hold is too long at first.
Rounds of rapid full breaths, then a retention hold on the empty lungs, then a short recovery hold. Built against the protocol as transcribed in my notes:
Do ~40 repetitions of the following breathing exercise: Max inhale (raise chest) and "let go" exhale (drop chest sharply). The let-go exhale can be thought of as a short "hah." If you're doing this correctly, after 20 to 30 reps you might feel loose, mild lightheadedness, and a little bit of tingling. The tingling is often felt in the hands first.
From my reading notes, at Kindle location 1117.
| Setting | Options |
|---|---|
| Breaths per round | 20, 30, 35, 40 |
| Rounds | 1, 2, 3, 4 |
| Pace | Slow (2.2s in, 1.8s out), Steady (1.7 / 1.3), Brisk (1.3 / 1.0) |
The retention is open-ended and counts up; it ends when you say so, by pressing the button, tapping the orb, or hitting space. Each round's retention time is reported on the closing screen. A 15 second recovery hold follows, then the next round begins after a short rest.
Wim Hof breathing causes light-headedness by design. The app says so up front, in a dismissible notice that appears whenever you select that practice:
Sit or lie down somewhere safe. This breathing causes light-headedness by design. Never practice in or near water, while driving, or standing up. If you are pregnant or have epilepsy, a heart condition, or high blood pressure, check with a doctor first. Stop if you feel unwell.
The notice is deliberately not remembered between visits. It reappears each time you enter the practice from another one, or load the page into it, and stands down on its own once a session starts. The mid-session guidance repeats the part that matters while you are breathing.
This is a pacing tool, not medical advice.
The expand icon, or F, hands the whole screen to the orb and takes everything
else out of the layout:
Move the mouse, tap, or press a key and the controls fade back for a second and a half. While a session is running a reveal offers only Reset and Pause, plus the sound and exit icons. The settings would only reset the session, so they stay away until you do. It asks for real browser fullscreen too, and falls back to the bare layout where that is refused, such as iOS Safari.
Everything is generated with the Web Audio API; there are no audio files to load.
| Setting | What you hear |
|---|---|
| Off | nothing |
| Bells | a struck bowl at each phase change, pitched differently for in, out, and hold |
| Bells + tone | the bells, plus a low tone that rises with the inhale and falls with the exhale |
Wim Hof swaps the bells for breath-shaped sounds: a rising whoosh on each inhale, a low "hah" on each exhale, and bowl strikes at the retention, the recovery, and the end.
The speaker icon is a shortcut that flips between off and your last choice, so the icon and the sound row can never disagree.
| Key | Action |
|---|---|
Space or Enter |
Begin, pause, or end a Wim Hof retention |
F |
Focus mode |
M |
Mute, or restore the last sound setting |
R |
Reset |
Esc |
Dismiss the safety notice, otherwise leave focus mode |
- Sound needs a gesture first. Browsers will not let a page make noise until you interact with it, so audio is armed when you press Begin.
- Sessions do not survive a reload. Unlike the sibling tea timer, only your settings and totals persist; a session in progress is lost if you refresh.
- What is stored. Practice, every per-practice setting, sound choice, focus
preference, and the session log live in
localStorageunderbreathe.v1. Nothing leaves the browser. - The screen stays awake during a session where the Wake Lock API is available.
- Offline. Nothing is fetched at runtime. Both typefaces are subset to latin,
embedded in
fonts.cssas data URIs, and carry a full variable weight axis. Verified working fromfile://, where a separate font request would be refused. - Browsers. Modern evergreen only; it leans on
color-mix()in OKLab and container queries, so roughly Safari 16.4+, Chrome 111+, Firefox 113+. - Themes. Light and dark are both designed; the page follows your system setting.
- Motion. Under
prefers-reduced-motionthe glow, the closing animation, and the button lift are dropped. The orb still scales, since that motion is the pacer. - Centering. The countdown is optically centered at runtime rather than by its
box. Monospace digits have uneven side bearings, so at full size
10:00sits almost 3px right of true center while40sits under a fifth of a pixel off. A fixed nudge would be wrong for nearly every value, so the ink is measured per string and the difference is corrected.
| File | What it is |
|---|---|
index.html |
The whole application |
fonts.css |
Azeret Mono and Karla, subset and embedded as data URIs |
screenshots/ |
Images used by this README |
LICENSE |
MIT license |
Pushing a change to index.html or fonts.css on main syncs it to the site
automatically. .github/workflows/sync-to-site.yml stamps a provenance header
onto the page, copies the font bundle byte for byte, and commits both to the
personal site repo at sites/breathe/, which in turn trips that repo's own
build-and-deploy workflow. Jekyll passes both files through untouched because
they have no front matter, and _data/experiments.yml lists the page on the
experiments page.
Both files sync together, since the page loads the stylesheet from beside itself
and would otherwise fall back to system fonts. The sync refuses to run if
fonts.css goes missing or if the page grows front matter, and it stops before
pushing if anything outside sites/breathe/ differs.
Comparison ignores the header, so a re-run on an unchanged app reports no change rather than manufacturing a commit whose only difference is the date.
One thing it does not cover: the thumbnail at images/experiments/breathe.jpg
in the site repo is a still of the app, and only needs redoing if the design
changes noticeably. Regenerate it and run that repo's tools/optimize-images.sh.
Code is MIT; see LICENSE. The two typefaces embedded in fonts.css, Azeret Mono
and Karla, are under the SIL Open Font License 1.1.




