TestimonialsMinimal Social Proof
Strakke minimale testimonialslijst zonder achtergrondkaarten.
src/components/social-proof/TestimonialsMinimal.astro
---
/**
* TestimonialsMinimal
* Strakke minimale testimonialslijst zonder achtergrondkaarten.
*/
interface Props {
eyebrow?: string;
headline?: string;
testimonials: { quote: string; name: string; role: string; rating?: number }[];
bg?: 'white' | 'light';
}
const { eyebrow, headline, testimonials, bg = 'white' } = Astro.props;
---
<section class={`tm tm--${bg}`}>
<div class="tm-inner">
{(eyebrow || headline) && (
<div class="tm-header">
{eyebrow && <span class="tm-eyebrow">{eyebrow}</span>}
{headline && <h2 class="tm-headline">{headline}</h2>}
</div>
)}
<div class="tm-list">
{testimonials.map(t => (
<div class="tm-item">
{t.rating && (
<div class="tm-stars">
{Array.from({length: t.rating}).map(() => <span class="tm-star">★</span>)}
</div>
)}
<p class="tm-quote">"{t.quote}"</p>
<div class="tm-meta">
<span class="tm-name">{t.name}</span>
<span class="tm-sep">·</span>
<span class="tm-role">{t.role}</span>
</div>
</div>
))}
</div>
</div>
</section>
<style>
.tm { padding: 5rem 2rem; }
.tm--white { background: #fff; border-top: 1px solid #e5e7eb; }
.tm--light { background: #f8fafc; border-top: 1px solid #e5e7eb; }
.tm-inner { max-width: 1100px; margin: 0 auto; }
.tm-header { text-align: center; margin-bottom: 3.5rem; }
.tm-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; }
.tm-headline { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 900; color: #0a0a0a; letter-spacing: -0.04em; line-height: 1.15; margin: 0; }
.tm-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.5rem 3rem; }
.tm-item { display: flex; flex-direction: column; gap: 0.875rem; padding-bottom: 2.5rem; border-bottom: 1px solid #e5e7eb; }
.tm-stars { display: flex; gap: 0.2rem; }
.tm-star { color: #f59e0b; font-size: 0.875rem; }
.tm-quote { font-size: 1rem; line-height: 1.7; color: #374151; font-style: italic; margin: 0; }
.tm-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.tm-name { font-weight: 700; color: #0a0a0a; }
.tm-sep { color: #d1d5db; }
.tm-role { color: #9ca3af; }
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
testimonials * | { quote: string; name: string; role: string; rating?: number }[] | — | Testimonials |
eyebrow | string | — | Eyebrow |
headline | string | — | Sectie headline |
bg | 'white' | 'light' | — | Achtergrond variant |
* = verplicht