Skip to content

No.59 · Controls

Pulse Loader

A loading indicator drawn as a heartbeat trace with a glowing dash that spikes as it crosses the beat.

The prompt

Written for the variant you picked above: Frost

Design a loading indicator as an ECG trace. Draw one SVG path (viewBox 100×40, preserveAspectRatio none): a flat line, a small rounded P wave, a sharp QRS spike (down, up to the top, down to the bottom, back), a T wave, then flat again. Render it twice: a faint ghost (1px, 20% opacity) so the whole shape is always readable, and a bright line (2px, in the colour prop, soft drop-shadow glow) using pathLength=1 with stroke-dasharray 0.24 1 so only a 24% dash is visible. Animate stroke-dashoffset from 0.24 to −1 over 1.6s with an ease-in-out curve, looping — the dash starts wholly before the path and ends wholly past it, so the light seems to travel along the trace and spike as it crosses the beat, then re-enters. Provide three sizes and a colour prop, with a muted label beside it. Use role="status" with the label as its accessible text. Under reduced motion show the whole trace lit, static. Selected variant — Frost: color="#b9cce4" (frost blue); three sizes stacked — lg "Syncing your library", md "Loading", sm "Saving" — on #0b080d.

Notes

Interaction
None — status indicator.
Motion
Dash travel 1.6s ease-in-out infinite.
Accessibility
role=status with visible text label; decorative SVG is aria-hidden. Reduced motion shows a static lit trace.
Responsive
Three fixed sizes (sm, md, lg).

Featured

301 components