src/components/social-proof/NumberedStats.astro
---
/**
* NumberedStats
* Genummerde statistieken met grote visuele nummers.
*/
interface Props {
eyebrow?: string;
headline?: string;
stats: { number: string; label: string; description?: string }[];
bg?: 'white' | 'light' | 'dark';
}
const { eyebrow, headline, stats, bg = 'white' } = Astro.props;
---
<section class={`ns ns--${bg}`}>
<div class="ns-inner">
{(eyebrow || headline) && (
<div class="ns-header">
{eyebrow && <span class="ns-eyebrow">{eyebrow}</span>}
{headline && <h2 class="ns-headline">{headline}</h2>}
</div>
)}
<div class="ns-grid">
{stats.map((s, i) => (
<div class="ns-item">
<span class="ns-num">{String(i + 1).padStart(2, '0')}</span>
<div class="ns-content">
<span class="ns-value">{s.number}</span>
<span class="ns-label">{s.label}</span>
{s.description && <p class="ns-desc">{s.description}</p>}
</div>
</div>
))}
</div>
</div>
</section>
<style>
.ns { padding: 5rem 2rem; }
.ns--white { background: #fff; border-top: 1px solid #e5e7eb; }
.ns--light { background: #f8fafc; border-top: 1px solid #e5e7eb; }
.ns--dark { background: #0a0a0a; }
.ns-inner { max-width: 1100px; margin: 0 auto; }
.ns-header { text-align: center; margin-bottom: 3.5rem; }
.ns-eyebrow { display: block; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent,#6366f1); margin-bottom: 0.75rem; }
.ns-headline { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 900; letter-spacing: -0.04em; line-height: 1.15; margin: 0; }
.ns--white .ns-headline, .ns--light .ns-headline { color: #0a0a0a; }
.ns--dark .ns-headline { color: #fff; }
.ns-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; }
.ns-item { display: flex; flex-direction: column; gap: 1rem; padding: 2.5rem 2rem; position: relative; }
.ns--white .ns-item, .ns--light .ns-item { border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.ns--dark .ns-item { border-right: 1px solid rgba(255,255,255,0.06); border-bottom: 1px solid rgba(255,255,255,0.06); }
.ns-item:nth-child(4n) { border-right: none; }
.ns-num { font-size: 0.6875rem; font-weight: 700; font-family: monospace; letter-spacing: 0.08em; opacity: 0.3; }
.ns--white .ns-num, .ns--light .ns-num { color: #0a0a0a; }
.ns--dark .ns-num { color: #fff; }
.ns-value { display: block; font-size: 3rem; font-weight: 900; color: var(--color-accent,#6366f1); letter-spacing: -0.04em; line-height: 1; }
.ns-label { display: block; font-size: 1rem; font-weight: 700; }
.ns--white .ns-label, .ns--light .ns-label { color: #0a0a0a; }
.ns--dark .ns-label { color: #fff; }
.ns-desc { font-size: 0.875rem; line-height: 1.6; margin: 0; }
.ns--white .ns-desc, .ns--light .ns-desc { color: #6b7280; }
.ns--dark .ns-desc { color: rgba(255,255,255,0.45); }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
stats * | { number: string; label: string; description?: string }[] | — | Statistieken |
eyebrow | string | — | Eyebrow |
headline | string | — | Sectie headline |
bg | 'white' | 'light' | 'dark' | — | Achtergrond variant |
* = verplicht