StealThis .dev

Storybook — Drag-to-match Activity

A cheerful drag-to-match activity for early readers in the Critter Cottages storybook style. A column of inline-SVG animal friends faces a column of cozy homes, and the player drags each friend onto the right place. Correct drops snap shut with a happy pop and a gold star, while wrong ones bounce back with a gentle shake. Pointer-based dragging is mirrored by a full tap and keyboard fallback, with a running score, an all-matched confetti finale, an easy-read font switch, and a one-tap reset.

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

Code

Drag-to-match Activity

A friendly two-column matching game built for tiny hands. On the left, five animal friends — Buzzy the bee, Bubbles the fish, Hoot the owl, Hops the frog, and Thistle the bunny — wait in soft, rounded cards drawn entirely as inline SVG. On the right sit their homes: the hive, the pond, the tall tree, the lily pad, and the cozy burrow, each shuffled fresh every round. The whole board uses the storybook palette of warm cream, orange, teal, and gold with thick playful borders and bouncy shadows.

Players drag a friend onto a home using pointer events that work the same with a mouse or a finger: a tilted ghost card follows the cursor, candidate homes light up, and the one under the pointer glows. Drop on the right home and it snaps closed with a pop animation, nests a mini portrait of the animal, plants a gold star, and ticks the score up; drop on the wrong one and the friend shakes its head and waits to be tried again. Every interaction is mirrored for accessibility — tap a friend then tap a home, or Tab to a friend, press Enter to pick it up, and Enter again on a home to place it. A live region narrates each move.

When all five friends are home, a confetti celebration pops up with a play-again button. A header keeps the score, an easy-read font toggle swaps to a wider, more legible typeface with looser spacing for dyslexia-friendly reading, and a start-over button reshuffles for a brand-new round. The layout collapses to a tight single-scroll board and respects reduced-motion preferences down to 360px.

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