StealThis .dev

Empty States — All-done / inbox-zero state

A task list that rewards finishing the job: tick the final item and the list animates away into a celebratory inbox-zero empty state with a drawn checkmark badge, a confetti micro-animation, and a friendly all-caught-up headline. A live segmented switcher toggles between a celebratory treatment with confetti and a next-action CTA, and a calm, minimal variant that simply settles. An Undo control (and the Escape key) restores the cleared items, an aria-live counter tracks how many tasks remain, and a toast confirms every action.

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

Code

All-done / inbox-zero state

A compact task card sits inside a Driftboard-style product shell, listing four realistic, clearly fictional to-dos with colour-coded tags (Urgent, Review, Focus, Errand) and a live “left” counter in the header. Checking a box strikes the item through; checking off the last remaining task triggers the payoff — the rows stagger out and the card swaps to a centred inbox-zero empty state featuring an SVG checkmark badge that draws itself in, a bold “You’re all caught up” headline, and a subtle next-action link.

The pattern ships with two variants exposed through a segmented switcher in the header. The celebratory treatment pops the badge, fires a short CSS/JS confetti burst, and surfaces a “Plan tomorrow’s focus” CTA; the calm treatment skips the confetti, settles the badge with a gentle fade, and keeps the copy understated. Switching variants while the empty state is showing re-renders it live, so you can compare both side by side without resetting.

Every interaction is reversible and accessible. An Undo button — or the Escape key — restores the most recently cleared items and returns you to the list, the header counter is wired with aria-live for screen readers, the segmented control is arrow-key navigable, all controls have focus-visible rings, and a small toast confirms undo and reset actions. The layout collapses to a single column down to 360px, and a reduced-motion media query disables the confetti and draw animations.

Illustrative UI only — fictional product, names, and tasks.