Skip to content

QuietwaveInteractive Science Explainer Scrollytelling Template with Canvas Wave Simulation and Quiz

2 sites from this one prompt

About this template

Quietwave is a single-page interactive explainer about how noise-cancelling headphones work, laid out like a feature in a printed science magazine. It opens with a large serif headline and a slowly drifting sound wave. Then it walks the reader through four chapters: what a sound wave is, how an opposite wave cancels it, what sits inside an earcup, and why some noise still gets through. It closes with a four-question quiz that gives instant feedback.

It suits science writers, teachers, museum and outreach teams, hardware startups explaining their technology, and anyone who wants to teach one idea well instead of listing features. Everything is drawn in code. The waves are Canvas 2D, the earcup cut-away and the frequency chart are inline SVG, and the site uses no photos, audio or microphone access, so there are no image licenses to track.

The design uses warm off-white paper, deep ink text, hairline rules, figure numbers and italic captions. Two accents carry meaning: teal is always the noise and coral is always the anti-noise. In the scrollytelling chapters a sticky figure changes state as each text step scrolls into view. The phase lab lets the reader drag the coral wave or a slider from 0° to 360° and watch the summed line flatten at 180°, with a live readout of how loud the result is. The earcup diagram builds up one part at a time, with numbered callouts and leader lines. In reduced-motion mode the waves stay still and the steps switch without animation, and every control still works.

To adapt it, change the publication name, the device, the noise source, the reader and the issue label. All copy lives in one content file, and the diagram keeps the same four-part sense, compute, play and check structure.

An original VibeFather design, written and built with AI coding agents.

How we make templatesAre you the creator? Request changes or removal

The prompt

The live demo was built from exactly this text — nothing added. The other cases add only their own values for the variables.

# Quietwave — Interactive Science Explainer Scrollytelling Template with Canvas Wave Simulation and Quiz

Build this website exactly as described below. Replace the [VARIABLES] with your own values; keep everything else.

## Brief
A single-page scrollytelling science explainer titled 'Silence, made of sound', published by the invented magazine [BRAND]. It explains how [DEVICE] cancel [NOISE_SOURCE] in four chapters. (1) Sound as a pressure wave: a sticky live canvas changes state with each scroll step. (2) The anti-noise phase lab: the reader drags a coral anti-noise wave or a 0–360° slider, and the summed wave flattens at 180° while a live readout shows the resulting level. (3) Inside the earcup: a hand-drawn SVG cut-away builds up part by part with numbered callouts. (4) Limits: an animated SVG bar chart of active versus passive cancellation by frequency. A four-question quiz with instant feedback closes the page. Everything is drawn in Canvas 2D or inline SVG. There is no audio, no microphone and no images.

- Audience: [READER]: curious, non-specialist readers who enjoy a well-made magazine feature and learn best by touching the idea, not by reading formulas.
- Goal: Make one idea click: adding a wave that is exactly out of phase with the noise makes the noise disappear. Let readers prove it to themselves with the slider, see where it happens inside the device, and check their understanding with the quiz.
- Tone: Calm, precise, warm, like a good science-magazine feature. Short declarative sentences, no exclamation marks, no hype, no jargon left unexplained. Figure numbers, captions and quiet confidence.

## Stack
- Framework: Vite 5 + vanilla TypeScript
- Styling: Plain CSS (custom properties)
- Libraries: vite (MIT), typescript (Apache-2.0), @fontsource-variable/newsreader (OFL-1.1), @fontsource/ibm-plex-sans (OFL-1.1), @fontsource/ibm-plex-mono (OFL-1.1)
- Build: `npm run build` → static files in `dist/`. No backend, no server code, no external APIs.
- Setup:
  - Scaffold with npm create vite@5 quietwave -- --template vanilla-ts. Add no framework and no runtime libraries beyond the three Fontsource packages.
  - vite.config.ts: base: './', build.outDir 'dist', build.sourcemap false, build.minify true. No plugins.
  - Import fonts in src/main.ts: '@fontsource-variable/newsreader/wght.css', '@fontsource-variable/newsreader/wght-italic.css', '@fontsource/ibm-plex-sans/400.css', '/500.css', '/600.css', '@fontsource/ibm-plex-mono/400.css', '/500.css'.
  - File layout: src/content.ts (every visible string, quiz data and variable values), src/styles/tokens.css (colors, type scale, spacing as CSS custom properties), src/styles/base.css, src/styles/sections.css, src/lib/canvas.ts (DPR-aware canvas setup with ResizeObserver), src/lib/motion.ts (prefers-reduced-motion flag plus lerp/ease helpers), src/figures/pressure.ts (Figure 1), src/figures/phaseLab.ts (Figure 2), src/figures/earcup.ts (builds the SVG for Figure 3), src/figures/bands.ts (Figure 4), src/scrolly.ts (IntersectionObserver step engine), src/quiz.ts, src/main.ts.
  - Define the variables at the top of src/content.ts as a const VARS object (BRAND, DEVICE, NOISE_SOURCE, READER, ISSUE_LABEL) and build every string from it with template literals. If the values differ from the defaults, rewrite the section copy so it reads naturally for the new device and noise source. Keep the structure, step count and quiz length.
  - index.html holds only the semantic skeleton (header, main with section ids hero, chapter-1, chapter-2, chapter-3, chapter-4, quiz, footer). main.ts fills text from content.ts and mounts the figures.
  - Every canvas: set width/height to CSS size × devicePixelRatio (cap DPR at 2), scale the context, redraw on ResizeObserver, and run requestAnimationFrame only while the canvas is on screen (IntersectionObserver), cancelling the frame when it leaves.
  - All keyframes and transitions live in src/styles/sections.css. JS changes state only through data-attributes (data-step, data-active, data-state) and CSS custom properties.
  - public/favicon.svg: a 32×32 square in #F6F2EA with a teal (#1F7A7A) sine wave and a coral (#E0654A) inverted sine wave crossing, and a flat ink (#1B1E23) line through the middle. Link it from index.html. Document <title>: '[BRAND] — How [DEVICE] work'.
  - package.json scripts: dev = vite, build = tsc --noEmit && vite build, preview = vite preview.

## Variables
- [BRAND] — Publication name (default: "Kestrel Review"). The invented magazine that publishes the explainer; shown in the masthead and footer.
- [DEVICE] — Device being explained (plural noun phrase) (default: "noise-cancelling headphones"). Used in the title, dek and chapter copy, e.g. 'How [DEVICE] work'.
- [NOISE_SOURCE] — Steady noise being cancelled (default: "the low hum of a jet cabin"). Lower-case phrase used mid-sentence; should be a steady, low-pitched sound.
- [READER] — Who the piece is for (default: "curious commuters"). Plural noun phrase used in the hero byline and the closing step.
- [ISSUE_LABEL] — Issue / section label (default: "Issue 14 · Acoustics"). Short label in the masthead, next to the brand.
- [CREDIT] — keep a small "Template by VibeFather" link to https://vibefather.ai/t/quietwave in the footer (default: yes; delete this line to remove it)

The copy under Pages & Sections is written for the default values. If your values differ, rewrite every headline, paragraph, label and image for them — same length, tone and structure. Layout, colors, type and motion stay as described.
Keep all copy, image paths and links in one content file (for example `src/content.ts`), keyed by section, so the content can be swapped later without touching components.

Pro template. The design, sections, motion and assets parts of this prompt are for Pro members. The live demo and DESIGN.md stay free.

Join Pro early access →

DESIGN.md

The design system on its own — colors, type, spacing and motion. Drop it into a project you already have.

Show DESIGN.md
---
name: "Quietwave"
colors:
  paper: "#F6F2EA"
  paper_deep: "#EDE6D8"
  ink: "#1B1E23"
  ink_muted: "#5C6169"
  rule: "#D8D0C0"
  teal: "#1F7A7A"
  teal_wash: "#D5E8E5"
  coral: "#E0654A"
  coral_wash: "#F7DDD4"
typography:
  display_serif_h1_h2_step_headings_pull_quote_captions_italic_masthead_wordmark: { family: "Newsreader (variable, with italic)", weights: [400, 500, 600] }
  text_sans_body_copy_dek_fallback_buttons_quiz_options: { family: "IBM Plex Sans", weights: [400, 500, 600] }
  mono_kickers_figure_numbers_callout_numbers_readouts_axis_labels: { family: "IBM Plex Mono", weights: [400, 500] }
spacing: "8px base unit. Page max-width 1200px with 32px side gutters (20px under 720px). 12-column grid, 24px gap. Reading column max-width 640px (about 66ch). Section padding 160px top/bottom on desktop, 96px on mobile. Each scroll step min-height 80vh. Type scale: H1 clamp(3rem, 6.5vw, 6rem), line-height 0.98, letter-spacing -0.02em, Newsreader 500. H2 clamp(2.25rem, 4vw, 3.5rem), line-height 1.05, Newsreader 500. Step heading 1.5rem, Newsreader 600. Body 18px, line-height 1.65, IBM Plex Sans 400. Dek 1.5rem, Newsreader 400 italic. Caption 15px, Newsreader 400 italic, ink-muted. Kicker 12px, IBM Plex Mono 500, uppercase, letter-spacing 0.12em, teal. Readouts 28px IBM Plex Mono 500 with tabular-nums."
radius: "Nearly square: 2px on figure panels, cards and buttons; 999px only on the slider thumb, callout number circles and the 'Cancelled' badge."
---

# Quietwave — Design System

Apply this design system to an existing project. It describes the look and feel only; for the full site, use prompt.md.

## Colors
- **paper** `#F6F2EA` — Page background (warm off-white)
- **paper-deep** `#EDE6D8` — Figure panels, phase-lab card, quiz option hover, SVG cut-face fill
- **ink** `#1B1E23` — Body text, headings, summed wave, SVG outlines
- **ink-muted** `#5C6169` — Captions, bylines, inactive steps, axis labels
- **rule** `#D8D0C0` — Hairline rules (1px), grid lines on canvases, input track
- **teal** `#1F7A7A` — The noise / signal: noise wave, kickers, reading progress bar, correct answers
- **teal-wash** `#D5E8E5` — Teal tint behind correct quiz feedback and the 'Cancelled' badge
- **coral** `#E0654A` — The anti-noise: anti-noise wave, slider thumb, signal path in the earcup, incorrect answers
- **coral-wash** `#F7DDD4` — Coral tint behind incorrect quiz feedback

## Typography
- **Display serif: H1, H2, step headings, pull quote, captions (italic), masthead wordmark** — Newsreader (variable, with italic) (OFL), weights 400/500/600. Self-host the font files.
- **Text sans: body copy, dek fallback, buttons, quiz options** — IBM Plex Sans (OFL), weights 400/500/600. Self-host the font files.
- **Mono: kickers, figure numbers, callout numbers, readouts, axis labels** — IBM Plex Mono (OFL), weights 400/500. Self-host the font files.

## Spacing & shape
- Spacing: 8px base unit. Page max-width 1200px with 32px side gutters (20px under 720px). 12-column grid, 24px gap. Reading column max-width 640px (about 66ch). Section padding 160px top/bottom on desktop, 96px on mobile. Each scroll step min-height 80vh. Type scale: H1 clamp(3rem, 6.5vw, 6rem), line-height 0.98, letter-spacing -0.02em, Newsreader 500. H2 clamp(2.25rem, 4vw, 3.5rem), line-height 1.05, Newsreader 500. Step heading 1.5rem, Newsreader 600. Body 18px, line-height 1.65, IBM Plex Sans 400. Dek 1.5rem, Newsreader 400 italic. Caption 15px, Newsreader 400 italic, ink-muted. Kicker 12px, IBM Plex Mono 500, uppercase, letter-spacing 0.12em, teal. Readouts 28px IBM Plex Mono 500 with tabular-nums.
- Radius: Nearly square: 2px on figure panels, cards and buttons; 999px only on the slider thumb, callout number circles and the 'Cancelled' badge.

## Motion
- Canvas waves animate with requestAnimationFrame at a calm speed: one full cycle every 2.4s for the fundamental. They pause when off screen.
- Figure state changes between scroll steps interpolate wave parameters (amplitude, frequency, overlays) over 600ms with easeInOutCubic.
- Text steps: the inactive step sits at opacity 0.35 and the active one at 1. Transition 400ms ease.
- Paragraph and heading reveal on first entering the viewport: opacity 0→1 and translateY 12px→0, 600ms cubic-bezier(0.2,0.7,0.2,1), 80ms stagger. Runs once.
- Earcup parts draw in with stroke-dashoffset (700ms) and fill-opacity 0→1 (400ms, delayed 300ms). Callout circles scale 0.6→1 with 200ms ease-out. In the final step the signal path's dash pattern flows from outer mic to ear (stroke-dashoffset loop, 1.6s linear infinite).
- Phase-lab readouts tween numbers over 150ms. The 'Cancelled' badge fades and scales 0.9→1 in 200ms when |phase−180| ≤ 4.
- Frequency bars grow from height 0 when Figure 4 enters view: 800ms easeOutCubic, 60ms stagger per band.
- Reading progress hairline under the masthead fills with scroll position (transform: scaleX, no transition).
- prefers-reduced-motion: reduce. Waves render as a single static frame (t=0) and redraw only when inputs change. Step and state changes are instant. No reveal translate (opacity only, 0ms). The earcup signal path is a static dashed line. Bars appear at full height. The slider, drag and quiz all still work.

## Imagery
No photos and no bitmaps. All art is drawn in code: Canvas 2D line waves (2px strokes, round caps) on faint rule-colored grid lines, and inline SVG diagrams with 1.5px ink outlines. Cut faces use a 45° hatch pattern (ink at 25% opacity, 6px spacing) over paper-deep, and foam uses a dot pattern. Teal always means noise and coral always means anti-noise; ink is the result. Figures carry a mono figure number ('FIG. 2') and an italic caption under a hairline rule.

## Tone
Calm, precise, warm, like a good science-magazine feature. Short declarative sentences, no exclamation marks, no hype, no jargon left unexplained. Figure numbers, captions and quiet confidence.

---
— Prompt by VibeFather · https://vibefather.ai/t/quietwave · CC BY 4.0 · Request removal: https://vibefather.ai/takedown