Welcome to Vanilla Breeze
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
This bell pulls live notifications from /go/notify/messages — the same contract documented at /docs/concepts/service-contracts/. Static articles like this one are the no-JS / no-backend fallback.
A dependency-free EPUB 3 reader built from vanilla web platform primitives. Drop <epub-reader src="book.epub"> into any page for a Shadow-DOM viewer with TOC sidebar, toolbar, progress bar, and keyboard navigation. It reads Vanilla Breeze design tokens directly, so it inherits the active theme with zero extra wiring.
@profpowell/epub-readerVia CDN:
<script type="module" src="https://unpkg.com/@profpowell/epub-reader@0.1.0/src/epub-reader.js"></script>
Or via npm:
npm install @profpowell/epub-reader
import '@profpowell/epub-reader';
Not currently bundled into Vanilla Breeze — wire it in yourself. There is no build coupling between the two repos; the interface is purely CSS custom properties.
A live <epub-reader> loading a small sample EPUB. The toolbar, sidebar, progress bar, and content area all pick up VB tokens (surface, text, border, interactive, font-mono). Switch the site theme to see the reader chrome re-skin.
| Attribute / API | Purpose |
|---|---|
src | URL of an EPUB to auto-load. |
start | Spine index to open first (default 0). |
hide-toc | Boolean — start with the TOC sidebar collapsed. |
allow-scripts | Boolean — adds allow-scripts to the chapter iframe sandbox. Off by default for security. |
.open(source) | Programmatic open. Accepts a URL or ArrayBuffer. |
.next() / .prev() | Navigate spine. |
.goToIndex(i, fragment?) | Jump to a specific spine entry. |
epub-loaded / epub-navigate / epub-error | Bubbling, composed CustomEvents. |
See the README for the full reference.
The component reads VB tokens directly through shadow-DOM inheritance — no bridge file needed.
| Token group | Tokens |
|---|---|
| Surfaces | --color-background, --color-surface, --color-surface-raised |
| Text | --color-text, --color-text-muted |
| Interactive | --color-interactive, --color-interactive-text, --color-danger |
| Chrome | --color-border, --border-width-thin, --radius-s, --radius-m, --radius-full, --shadow-l |
| Typography | --font-mono, --font-size-2xs, --font-size-xs, --font-size-s, --font-size-m, --font-weight-semibold |
| Spacing | --size-3xs, --size-2xs, --size-s, --size-m |
The single component-specific override is --reader-hl-color (selection / highlight color).
<!-- Auto-load a remote EPUB --><epub-reader src="https://example.com/book.epub"></epub-reader> <!-- Or open programmatically --><epub-reader id="reader" hide-toc></epub-reader><script type="module"> const reader = document.getElementById('reader'); document.querySelector('input[type=file]') .addEventListener('change', e => reader.open(e.target.files[0]));</script>
Give the element a definite block size (via CSS) — it does not auto-expand. block-size: 100vh for a full-page reader, or any other fixed/percent height that fits your layout.