src/components/text/TextCentered.astro
---
/**
* TextCentered
* Gecentreerd tekstblok met decoratieve elementen
*/
interface Props {
eyebrow?: string;
headline?: string;
body?: string;
}
const { eyebrow = 'Over BLURR', headline = 'Marketing bureau voor bedrijven die willen groeien', body = 'We geloven dat marketing meer moet zijn dan likes en impressies. Alles wat we doen is gericht op één ding: meer omzet voor jouw bedrijf. Transparant, meetbaar en zonder ruis.' } = Astro.props;
---
<div class="tctr-wrap">
<div class="tctr-deco tctr-deco--top"></div>
{eyebrow && <span class="tctr-eyebrow">{eyebrow}</span>}
{headline && <h2 class="tctr-headline">{headline}</h2>}
<div class="tctr-divider"></div>
{body && <p class="tctr-body">{body}</p>}
<div class="tctr-deco tctr-deco--bottom"></div>
</div>
<style>
.tctr-wrap {
--color-accent: #6366f1;
--color-primary: #0a0a0a;
text-align: center;
padding: 64px 32px;
font-family: system-ui, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
max-width: 680px;
margin: 0 auto;
}
.tctr-deco {
width: 40px;
height: 3px;
background: linear-gradient(90deg, var(--color-accent), transparent);
border-radius: 2px;
}
.tctr-deco--bottom {
background: linear-gradient(90deg, transparent, var(--color-accent));
}
.tctr-eyebrow {
font-size: 0.78rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--color-accent);
}
.tctr-headline {
margin: 0;
font-size: clamp(1.6rem, 4vw, 2.25rem);
font-weight: 800;
color: var(--color-primary);
letter-spacing: -0.02em;
line-height: 1.2;
}
.tctr-divider {
width: 48px;
height: 2px;
background: var(--color-accent);
border-radius: 2px;
opacity: 0.5;
}
.tctr-body {
margin: 0;
font-size: 1.05rem;
line-height: 1.7;
color: #4b5563;
max-width: 540px;
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
headline | string | — | Headline |
eyebrow | string | — | Eyebrow |
body | string | — | Body tekst |
* = verplicht