Skip to content

No.94 · Controls

Pulse Loader

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

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

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 (frost): color="#b9cce4" (frost blue); three sizes stacked — lg "Syncing your library", md "Loading", sm "Saving" — on #0b080d. This selection takes precedence over references to other themes or options in the general brief. Implement this selected appearance; do not add a variant picker or alternative appearances unless requested. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. 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 behavior: Three fixed sizes (sm, md, lg). Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

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).