StealThis .dev
Pages Hard

Storybook — Tap-to-animate Scene

A cheerful tap-to-play picture-book scene built entirely from inline SVG, where children explore Sunny Meadow by waking five friendly characters. Tap the sun, a drifting cloud, a hopping bird, a tail-wagging puppy, or the cottage door and each one pops with its own keyframe animation, a sound-word speech bubble, sparkle particles, and a soft chime. A find-all-5 counter, progress pips, story log, easy-read font toggle, celebration overlay, full keyboard support, and reduced-motion respect round it out.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Tap-to-animate Scene

A single hand-drawn picture-book page rendered entirely as inline SVG: a sunny meadow with rolling hills, wildflowers, a beaming sun, two clouds, a chirpy bird, a sleepy puppy, and a little cottage. Five of these characters are tappable hotspots, and the goal printed across the top is simple and inviting — find 5 surprises. The whole thing reads as a friendly storybook spread, with soft bright colors, thick playful outlines, and rounded everything.

Tapping (or clicking, or pressing Enter on a focused hotspot) wakes a character with its own personality. The sun spins its rays and pops, the cloud drifts sideways, the bird hops and flaps, the puppy nods and wags its tail, and the cottage door swings open. Each tap fires a hand-lettered sound-word bubble — “Shine!”, “Whoosh!”, “Tweet!”, “Woof!”, “Knock!” — a burst of colored sparkle particles at the touch point, and a short friendly chime via WebAudio (no audio files). A live counter, five progress pips, and a running story log track which surprises have been discovered, and finding all five triggers a bouncing confetti celebration overlay.

Everything is built for small hands and assistive tech: every hotspot is a real keyboard-focusable button with a focus-visible ring, the toolbar offers an easy-read (dyslexia-friendly) font toggle and a sound-words on/off switch, touch targets stay large, the layout collapses to a single column on phones, and all motion is suppressed under prefers-reduced-motion while the interactions still work.

Illustrative kids’ UI only — fictional stories, characters, and audio.