REFERENCE
- Gallery page: https://magpui.com/en/i/heartbeat-trace-with-fading-tail-1a795c
- First frame (image): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/heartbeat-trace-with-fading-tail-1a795c/shot.jpg
- Clip (mp4): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/heartbeat-trace-with-fading-tail-1a795c/clip.mp4
- Original post: https://60fps.design/shots/runmo-lab-pulse-heart-ecg-interaction by Runmo
Before building, download the first frame and look at it. If ffmpeg is available, download the clip and extract frames (ffmpeg -i clip.mp4 -vf fps=2 frame-%02d.png), then study the motion frame by frame. Match what you see; the text below describes it, the frames are the truth.
BUILD: Build one compact health telemetry card with a continuously drawing ECG-like trace above a static metrics grid. Keep the movement restrained and the data readable; this is a decorative sample visualization, not medical monitoring.
DESIGN SYSTEM: Approximately 340px wide; near-black burgundy #170606 background, faint #482021 grid and borders, red #D43E50 trace, warm white #F4E9E7 labels. Chart 120px tall with 1.5px stroke and tiny pale leading dot. Use 14px sans headings, 10px monospaced labels, 24px padding and a two-column metrics area separated by hairlines.
MOTION: On mount move a bright point left-to-right across a repeating ECG-shaped path over approximately 2400ms, cubic-bezier(0,0,1,1). Reveal the stroke behind the point with a fading 100px tail and keep a very dim full waveform underneath. Wrap seamlessly; metrics remain stationary. Treat duration as rebuild tuning, not source measurement.
SECTIONS: Heading; waveform viewport; two slim range metrics; two-column summary. Idle running state and paused offscreen state.
IMPLEMENTATION: SVG paths and clipping masks driven by Motion or requestAnimationFrame, avoiding per-frame React renders. Limit glow to the leading dot. Pause when offscreen and when the document is hidden. Provide a pause control with keyboard focus; reduced motion shows the complete static waveform without looping.
ADAPT TO THE PROJECT: Reuse existing design tokens, components and fonts. Map these colors to nearby project tokens. Never copy logos, brand names, photos or illustrations; use neutral placeholder content.
SUCCESS CHECK:
- Motion remains smooth without layout jumps at mobile widths.
- All controls work with keyboard and visible focus.
- Reduced-motion mode preserves readable data without continuous animation.