Analytics Metric Card
A compact analytics card with sparkline, delta badge, and animated count-up for live data feel.
Analytics Metric Card
by FreeCsStyles Dev's
DashboardsModern
🌐HTML/CSS
#analytics#metrics#sparkline#kpi
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/analytics-metric-card.
<iframe src="/embed/analytics-metric-card" sandbox="allow-scripts" loading="lazy" title="Analytics Metric Card" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Analytics Metric Card. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<div class="metric-card">
<div class="metric-head">
<div>
<span class="metric-label">Monthly Revenue</span>
<div class="metric-value">$89,241</div>
</div>
<span class="metric-delta">↑ 12.5%</span>
</div>
<svg class="metric-spark" viewBox="0 0 280 60" preserveAspectRatio="none">
<polygon points="0,45 40,44 80,38 120,32 160,26 200,20 240,16 280,8 280,60 0,60" fill="rgba(139,92,246,0.15)" />
<polyline points="0,45 40,44 80,38 120,32 160,26 200,20 240,16 280,8" fill="none" stroke="#8b5cf6" stroke-width="2.5" />
</svg>
</div>CSS
.metric-card {
max-width: 320px;
border-radius: 18px;
padding: 22px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.metric-head {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 16px;
}
.metric-label { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.5); }
.metric-value {
font-size: 30px;
font-weight: 800;
letter-spacing: -1px;
color: #fff;
margin-top: 4px;
}
.metric-delta {
padding: 5px 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
background: rgba(34, 197, 94, 0.15);
color: #22c55e;
}
.metric-spark { width: 100%; height: 60px; }Where Analytics Metric Card fits
- Admin Panels
- SaaS Metrics
- KPI Watch
Topics
- #analytics
- #metrics
- #sparkline
- #kpi