Zoeken...  ⌘K GitHub

TextDark text

Donkere achtergrond tekst sectie met CTA.

/text-dark
src/components/text/TextDark.astro
---
/**
 * TextDark
 * Donkere achtergrond tekstsectie
 */
interface Props {
  headline?: string;
  body?: string;
  cta?: { label: string; href: string };
}
const { headline = 'Klaar om te groeien?', body = 'Elke week kiezen nieuwe bedrijven voor BLURR omdat ze klaar zijn met marketing die niet presteert. Boek een gratis strategiegesprek en ontdek wat er mogelijk is voor jouw bedrijf.', cta = { label: 'Plan een gesprek', href: '#contact' } } = Astro.props;
---

<section class="tdark-section">
  <div class="tdark-inner">
    <h2 class="tdark-headline">{headline}</h2>
    <p class="tdark-body">{body}</p>
    {cta && (
      <a class="tdark-cta" href={cta.href}>{cta.label}</a>
    )}
  </div>
</section>

<style>
  .tdark-section {
    --color-accent: #6366f1;
    background: #0a0a0a;
    padding: 72px 24px;
    font-family: system-ui, sans-serif;
  }
  .tdark-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .tdark-headline {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.75rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.15;
  }
  .tdark-body {
    margin: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #9ca3af;
    max-width: 520px;
  }
  .tdark-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: opacity 0.15s, transform 0.15s;
  }
  .tdark-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
  }
</style>

Props

Prop Type Default Beschrijving
headline string Headline
body string Body
cta { label: string; href: string } CTA knop

* = verplicht