Zoeken...  ⌘K GitHub

HeadingAccent heading

Geaccentueerd koptitel-blok met gekleurde achtergrond en eyebrow.

/heading-accent
src/components/heading/HeadingAccent.astro
---
interface Props {
  eyebrow?: string;
  title: string;
  sub?: string;
}
const { eyebrow = "Aanbieding", title = "Start vandaag nog met BLURR", sub = "Boek een gratis strategiegesprek en ontdek jouw groeipotentieel." } = Astro.props;
---

<div class="hd-accent">
  {eyebrow && <span class="hd-accent__eyebrow">{eyebrow}</span>}
  <h2 class="hd-accent__title">{title}</h2>
  {sub && <p class="hd-accent__sub">{sub}</p>}
</div>

<style>
  :root {
    --color-accent: #6366f1;
    --color-primary: #0a0a0a;
  }
  .hd-accent {
    background: var(--color-accent);
    padding: 3rem 2.5rem;
    border-radius: 1rem;
    text-align: center;
  }
  .hd-accent__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.75rem;
  }
  .hd-accent__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  .hd-accent__sub {
    margin: 0 auto;
    max-width: 480px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.65;
  }
</style>

Props

Prop Type Default Beschrijving
eyebrow string Klein label boven de titel
title * string Hoofdtitel
sub string Subtekst

* = verplicht