src/components/heading/HeadingTag.astro
---
interface Props {
tag: string;
title: string;
description?: string;
}
const { tag = "Case study", title = "Van 0 naar 3,2 miljoen omzet in 18 maanden", description = "Hoe een lokale retailer met BLURR's e-commerce aanpak landelijk marktleider werd." } = Astro.props;
---
<div class="hd-tag">
<span class="hd-tag__tag">{tag}</span>
<h2 class="hd-tag__title">{title}</h2>
{description && <p class="hd-tag__desc">{description}</p>}
</div>
<style>
:root {
--color-accent: #6366f1;
--color-primary: #0a0a0a;
}
.hd-tag {
padding: 2.5rem 0;
max-width: 700px;
}
.hd-tag__tag {
display: inline-block;
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--color-accent);
border: 1.5px solid var(--color-accent);
padding: 0.2rem 0.6rem;
border-radius: 4px;
margin-bottom: 0.85rem;
}
.hd-tag__title {
margin: 0 0 0.75rem;
font-size: clamp(1.75rem, 4vw, 2.75rem);
font-weight: 800;
color: var(--color-primary);
line-height: 1.15;
letter-spacing: -0.02em;
}
.hd-tag__desc {
margin: 0;
font-size: 1.05rem;
color: #555;
line-height: 1.65;
}
</style>
Props
| Prop | Type | Default | Beschrijving |
|---|---|---|---|
tag * | string | — | Tag-label |
title * | string | — | Hoofdtitel |
description | string | — | Beschrijvende tekst |
* = verplicht