StealThis .dev

Delivery — ETA / Countdown Badge

A self-contained set of delivery ETA and countdown badges for tracking screens. It pairs a map-forward hero card with a live ticking countdown, an animated driver marker following an SVG route, and a full gallery of badge states — en-route countdown, arriving-now pulse, amber delayed alert, safety-green delivered confirmation, failed attempt, and a scheduled time-window pill. A live order feed shows independent mini countdowns flipping between states with toast notifications. Vanilla JS, no dependencies.

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

Code

ETA / Countdown Badge

A compact badge system for delivery and logistics UIs, built around one idea: the ETA should be the loudest thing on the screen. The hero card leads with an oversized mm:ss countdown that ticks down every second, sitting on a CSS-grid map placeholder where an animated driver marker tracks along an SVG route toward a destination pin. A time-window pill and a status badge keep context one glance away.

The state gallery covers the full lifecycle: a live blue countdown, an orange arriving-now pulse, an amber +9 min late delayed alert, a safety-green delivered confirmation, a red failed-attempt pill, and a neutral scheduled time-window badge. Each badge uses a tabular-numeric font and a soft pulse dot so motion reads as “live” without being noisy. A segmented control lets you jump the hero between en-route, arriving, delayed, and delivered states to watch the transitions.

Below, a live order feed runs four independent mini countdowns that flip themselves from en-route to arriving to delivered, flashing the row and firing a toast() when an order lands. Everything is vanilla JS in a single IIFE — drop the three snippet files in and the badges drive themselves, with prefers-reduced-motion honored throughout.

Illustrative UI only — fictional brand, not a real delivery service.