Hush
Sleep sounds app template ยท App screens
Accessible soft UI on one dusk-lavender ground: a pillowy device slab, controls pressed out of and into the same surface with paired light and shade, and a single indigo for anything that is on.
The first screen is the app itself, inside a soft device slab on desktop and full width on phones. Six sounds (rain, wind, waves, fire, brown noise and birds) each have a soft On/Off switch and a rotary volume knob that drags up and down or answers the arrow, Page, Home and End keys. Every sound is generated live with the Web Audio API: rain is high-passed white noise, wind is brown noise through a band-pass whose pitch and level drift on slow LFOs, waves swell every ten seconds, the fire is a low roar plus a stream of random 12 ms clicks, and birds are short sine chirps scheduled at random. Nothing plays until Play is pressed.
A sleep timer offers 15, 30 and 60 minutes or a validated custom length, draws its remaining time on a pressed-in ring and lowers the master gain along an eased curve over the last minute before pausing. Built-in mixes load with one tap, and the current mix can be saved under a name with inline validation (empty, length, characters, duplicates, no sound on, the Free plan's five-mix limit), a saving state and a success message. Below the app: how it helps with sleep and focus, a sample sleep week whose totals add up with a table version, two listener notes, pricing with a yearly switch and a trial form, questions and the footer.
Soft UI usually fails on contrast, so here softness never carries meaning alone. Every control also has a 1.5px outline at 3.2:1 against the ground (WCAG 1.4.11), its state is written in words (On, Off, 62%, Playing 3 of 6 sounds, fading out), on states add an indigo fill or a 2px indigo border at 5.9:1, text is 12.6:1 and secondary text 7.4:1, and focus is a solid 3px indigo ring with a ground-coloured gap. Reduced motion removes the breathing ring and level bars; the state text stays.
The brand is fictional: Hush, a sleep and focus sound mixer made by a team of four in Leeds. Names, people and figures on the page are invented.
What works
- Play and pause with a real Web Audio engine started only by the button
- Six soft switches with On and Off written beside them
- Six rotary knobs: pointer drag, arrow, Page, Home and End keys, wheel once focused, ARIA slider values
- Master volume range
- Sleep timer: 15, 30, 60 or a validated custom length, progress ring, fade-out, cancel
- Five built-in mixes plus saved mixes with delete, stored in localStorage
- Save mix form: name validation, saving, error and success messages
- Pricing yearly switch and a trial email form with validation, sending, sent and failed states
- Sleep week table toggle and question accordion
States you can link to
script.js reads these from the URL, so you can open the page in a given state to review it, screenshot it or show it to an agent.
| Parameter | What it does |
|---|---|
?mix=storm | loads a built-in mix: storm, campfire, seaside, focus or dawn. Open ?mix=storm |
?state=playing | shows the playing look (breathing ring, level bars, Pause) without starting audio; pressing the button starts real sound. Open ?state=playing |
?timer=30 | starts a sleep timer of any length from 1 to 240 minutes. Open ?timer=30 |
?state=fading | a 30 minute timer in its last 42 seconds, fading out. Open ?state=fading |
?state=error | the audio-not-supported state: Play disabled, explanation shown, mixer still usable. Open ?state=error |
?state=saved | saves the current mix as Rainy attic and shows the success message. Open ?state=saved |
?state=invalid | tries to save a duplicate name and shows the inline error. Open ?state=invalid |
?trial=sent | submits the Plus trial form and shows the sent message. Open ?trial=sent |
?trial=error | submits the Plus trial form and shows the failed-to-send message. Open ?trial=error |
Use it
Copy templates/hush/ into your project, or download the zip, which has the Screenery badge script already removed. Colours, type, spacing and radii are custom properties at the top of style.css. This template loads no libraries: only its own files and web fonts.
The docs explain the token pattern and how to move a template into React, Vue, Svelte or Astro. The guide has prompts for handing it to a coding agent.
Inspection
Loaded in Chromium 156.0.8078.4 (Playwright, headless) on 27 November 2026 at 1440, 1024, 768, 390 pixels wide and once more with reduced motion requested. Every check passed at every width.
- 1440 px
- Pass
- 1024 px
- Pass
- 768 px
- Pass
- 390 px
- Pass
- Reduced motion
- Pass
- Page weight
- 129 KB, 6 requests
Requests and transferred size were measured at 1440 pixels on a cold cache and include web fonts and any CDN library. The full result is in the viewer: open the Checks panel. How templates are checked.