Components Easy
Glow Metric Card
A compact metric card with a soft gradient glow and a hover lift for dashboards and landing pages.
cssgradientshadow
Targets: TS HTML React
Code
:root {
color-scheme: dark;
font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
background: radial-gradient(circle at top, #0f172a 0%, #020617 60%);
color: #e2e8f0;
}
.stage {
min-height: 100vh;
display: grid;
place-items: center;
padding: 32px;
}
.metric-card {
position: relative;
width: min(360px, 90vw);
padding: 28px 26px;
border-radius: 22px;
background: rgba(15, 23, 42, 0.8);
border: 1px solid rgba(148, 163, 184, 0.2);
box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
transition: transform 0.25s ease, box-shadow 0.25s ease;
overflow: hidden;
}
.metric-card::before {
content: "";
position: absolute;
inset: -30% 10% 40% -10%;
background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 60%);
filter: blur(24px);
z-index: 0;
}
.metric-card::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), transparent 55%);
opacity: 0.6;
z-index: 0;
}
.metric-card:hover {
transform: translateY(-6px);
box-shadow: 0 28px 50px rgba(15, 23, 42, 0.45);
}
.metric-label,
.metric-value,
.metric-meta {
position: relative;
z-index: 1;
}
.metric-label {
margin: 0 0 12px;
font-size: 0.85rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #94a3b8;
}
.metric-value {
margin: 0 0 14px;
font-size: 2.4rem;
font-weight: 700;
line-height: 1;
color: #f8fafc;
}
.metric-meta {
display: flex;
align-items: center;
gap: 10px;
font-size: 0.85rem;
color: #94a3b8;
}
.metric-delta {
padding: 4px 10px;
border-radius: 999px;
background: rgba(34, 197, 94, 0.15);
color: #4ade80;
font-weight: 600;
}Glow Metric Card
A single-card component for KPIs and dashboards. The glow is created with a radial gradient + blur so it feels premium without heavy shadows.
When to use
- SaaS dashboards with a primary metric
- Hero sections that need a stat highlight
- Pricing pages with a featured number
Notes
- The glow lives in a
::beforelayer to keep the content crisp. - Use
line-height: 1on the value to avoid vertical jitter.