Zoeken...  ⌘K GitHub

HeroMinimal Hero

Ultra clean wit hero met veel whitespace en elegante typografie. Premium / luxe positionering.

/hero-minimal
src/components/hero/HeroMinimal.astro
---
/**
 * HeroMinimal
 * Ultra clean wit hero met veel whitespace. Kleine elegante typografie,
 * dunne bordered CTA. Ideaal voor premium / luxe positionering.
 */
interface Props {
  eyebrow?: string;
  headline: string;
  sub?: string;
  ctaPrimary?: { label: string; href: string };
  ctaSecondary?: { label: string; href: string };
  align?: 'left' | 'center';
}
const { eyebrow, headline, sub, ctaPrimary, ctaSecondary, align = 'center' } = Astro.props;
---
<section class={`hm hm--${align}`}>
  <div class="hm-inner">
    {eyebrow && <p class="hm-eyebrow">{eyebrow}</p>}
    <h1 class="hm-headline">{headline}</h1>
    {sub && <p class="hm-sub">{sub}</p>}
    {(ctaPrimary || ctaSecondary) && (
      <div class="hm-actions">
        {ctaPrimary && <a href={ctaPrimary.href} class="hm-btn hm-btn--primary">{ctaPrimary.label}</a>}
        {ctaSecondary && <a href={ctaSecondary.href} class="hm-btn hm-btn--ghost">{ctaSecondary.label}</a>}
      </div>
    )}
  </div>
</section>
<style>
  .hm { padding: 8rem 2rem 7rem; background: #fff; }
  .hm--center { text-align: center; }
  .hm--left { text-align: left; }
  .hm-inner { max-width: 720px; }
  .hm--center .hm-inner { margin: 0 auto; }
  .hm-eyebrow { font-size: 0.6875rem; letter-spacing: 0.18em; text-transform: uppercase; color: #9ca3af; margin-bottom: 1.5rem; }
  .hm-headline { font-size: clamp(2.5rem, 5vw, 5rem); font-weight: 300; letter-spacing: -0.04em; line-height: 1.1; color: #0a0a0a; margin: 0 0 1.5rem; }
  .hm-sub { font-size: 1.0625rem; color: #6b7280; line-height: 1.7; max-width: 560px; margin: 0 auto 2.5rem; }
  .hm--left .hm-sub { margin-left: 0; }
  .hm-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .hm--left .hm-actions { justify-content: flex-start; }
  .hm-btn { display: inline-flex; align-items: center; padding: 0.75rem 2rem; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.04em; text-decoration: none; transition: all 0.2s; }
  .hm-btn--primary { background: #0a0a0a; color: #fff; }
  .hm-btn--primary:hover { background: #1a1a1a; }
  .hm-btn--ghost { border: 1px solid #d1d5db; color: #374151; }
  .hm-btn--ghost:hover { border-color: #9ca3af; color: #0a0a0a; }
</style>

Props

Prop Type Default Beschrijving
headline * string H1 tekst
eyebrow string Kleine label boven headline
sub string Ondertitel
ctaPrimary { label: string; href: string } Primaire CTA
ctaSecondary { label: string; href: string } Secundaire CTA
align 'left' | 'center' 'center' Tekstuitlijning

* = verplicht