A lightweight, chart-library-free Apple Health vital sparkline rendering smooth cubic Bezier gradients with silky pointer/touch crosshair scrubbing across HRV, Heart Rate, and SpO2.
// Drop the standalone vital-sparkline.html into /public/effects/vital-sparkline.html
// Or copy the HTML/CSS/JS tab directly into your component — zero external dependencies.
export function VitalSparklineEmbed() {
return (
<div className="relative min-h-[480px] w-full overflow-hidden rounded-2xl border border-white/10">
<iframe
src="/effects/vital-sparkline.html"
title="Interactive Vital Sparkline"
className="h-full min-h-[480px] w-full border-0"
loading="lazy"
/>
</div>
)
}Loading single-file HTML…
Create a single-file Interactive Vital Sparkline Chart using pure HTML, inline SVG, and vanilla JS (NO Chart.js/D3) inspired by Apple Health on a clean clinical white card (#ffffff on #eef5f7). - Chart Craft: Generate smooth cubic Bezier curves and soft vertical area-fill gradients (#0d9488 → #06b6d4) across 24 hourly data points for 3 switchable metrics (HRV ms, Resting BPM, SpO2 %). - Touch & Mouse Scrub: Dragging or hovering anywhere across the SVG snaps a vertical dashed crosshair guide and glowing focal dot smoothly to the nearest hour while updating the large tabular-nums readout live.
WHY THIS WORKS IN PRODUCTION
- Zero Chart.js / Recharts bloat — smooth inline SVG cubic Bezier in 3.5 KB
- Instant mouse & mobile touch scrubbing with live tabular-nums readout
- Easily adapts to analytics, revenue sparklines, stock prices & health metrics
- Instant metric switching (HRV, BPM, SpO2) with crisp visual hierarchy
DROP-IN SPECS // WEB & MOBILE FIT








