src/components/heading/HeadingGradient.astro
---
interface Props {
eyebrow?: string;
title: string;
sub?: string;
}
const { eyebrow = "Over ons", title = "Resultaten die spreken", sub = "Data-gedreven marketing die jouw omzet laat groeien." } = Astro.props;
---
<div class="hd-gradient">
{eyebrow && <span class="hd-gradient__eyebrow">{eyebrow}</span>}
<h2 class="hd-gradient__title">{title}</h2>
{sub && <p class="hd-gradient__sub">{sub}</p>}
</div>
<style>
:root {
--color-accent: #6366f1;
--color-primary: #0a0a0a;
}
.hd-gradient {
padding: 2.5rem 0;
text-align: center;
}
.hd-gradient__eyebrow {
display: inline-block;
font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--color-accent);
margin-bottom: 0.75rem;
}
.hd-gradient__title {
margin: 0 0 1rem;
font-size: clamp(2rem, 5vw, 3.5rem);
font-weight: 800;
line-height: 1.1;
background: linear-gradient(135deg, var(--color-accent) 0%, #a855f7 50%, #ec4899 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
letter-spacing: -0.02em;
}
.hd-gradient__sub {
margin: 0 auto;
max-width: 520px;
font-size: 1.05rem;
color: #555;
line-height: 1.65;
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
eyebrow | string | — | Klein label boven de titel |
title * | string | — | Hoofdtitel (met gradient) |
sub | string | — | Subtekst |
* = verplicht