Zoeken...  ⌘K GitHub

HeroSplitDark Hero

Premium donkere split hero: tekst op zwart, product/cover afbeelding rechts met luminosity blend en hover reveal.

/hero-split-dark
src/components/hero/HeroSplitDark.astro
---
/**
 * HeroSplitDark
 * Donkere split hero: links tekst op zwart, rechts verlichte feature/product afbeelding.
 * Marquee-label verticaal op de rand. Strak en premium.
 * Puur CSS animaties.
 */
interface Props {
  kicker?: string;
  headline: string;
  sub?: string;
  ctaLabel?: string;
  ctaHref?: string;
  secondaryLabel?: string;
  secondaryHref?: string;
  imageSrc: string;
  imageAlt?: string;
  imageCaption?: string;
  sideLabel?: string;
}

const {
  kicker,
  headline,
  sub,
  ctaLabel = 'Ontdek meer',
  ctaHref = '#',
  secondaryLabel,
  secondaryHref = '#',
  imageSrc,
  imageAlt = '',
  imageCaption,
  sideLabel = 'Premium · Quality · Design',
} = Astro.props;
---

<section class="hsd" data-component="hero-split-dark">

  <!-- Left dark panel -->
  <div class="hsd__left">
    <div class="hsd__left-content">
      {kicker && (
        <p class="hsd__kicker">
          <span class="hsd__kicker-line"></span>
          {kicker}
        </p>
      )}

      <h1 class="hsd__headline" set:html={headline} />

      {sub && <p class="hsd__sub">{sub}</p>}

      <div class="hsd__actions">
        <a href={ctaHref} class="hsd__cta">{ctaLabel}</a>
        {secondaryLabel && (
          <a href={secondaryHref} class="hsd__secondary">
            {secondaryLabel}
            <svg width="14" height="14" viewBox="0 0 14 14" fill="none">
              <path d="M2 7h10M8 3l4 4-4 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
            </svg>
          </a>
        )}
      </div>
    </div>

    <!-- Vertical marquee on border -->
    <div class="hsd__v-label" aria-hidden="true">
      <span class="hsd__v-label-track">
        {Array.from({ length: 6 }).map(() => (
          <span>{sideLabel} · </span>
        ))}
      </span>
    </div>
  </div>

  <!-- Right image panel -->
  <div class="hsd__right">
    <div class="hsd__img-wrap">
      <img src={imageSrc} alt={imageAlt} class="hsd__img" loading="eager" fetchpriority="high" />
      <!-- Subtle vignette -->
      <div class="hsd__vignette"></div>
    </div>
    {imageCaption && (
      <div class="hsd__caption">
        <span class="hsd__caption-dot"></span>
        {imageCaption}
      </div>
    )}
  </div>

</section>

<style>
  .hsd {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    overflow: hidden;
  }

  /* === LEFT PANEL === */
  .hsd__left {
    background: #080810;
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
  }

  .hsd__left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 4rem 5rem 5vw;
    max-width: 580px;
  }

  /* Kicker */
  .hsd__kicker {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1.75rem;
    animation: hsd-fade-up 0.5s 0.1s cubic-bezier(0.22,1,0.36,1) both;
  }

  .hsd__kicker-line {
    width: 24px;
    height: 1px;
    background: var(--color-accent, #6366f1);
    flex-shrink: 0;
  }

  /* Headline */
  .hsd__headline {
    font-size: clamp(2.75rem, 5.5vw, 5.5rem);
    font-weight: 900;
    line-height: 0.97;
    letter-spacing: -0.045em;
    color: #fff;
    margin-bottom: 1.5rem;
    animation: hsd-fade-up 0.7s 0.2s cubic-bezier(0.22,1,0.36,1) both;
  }

  .hsd__headline :global(em) {
    font-style: normal;
    color: var(--color-accent, #6366f1);
  }

  .hsd__headline :global(strong) {
    -webkit-text-stroke: 1.5px rgba(255,255,255,0.35);
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  /* Sub */
  .hsd__sub {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.4);
    max-width: 40ch;
    margin-bottom: 2.5rem;
    animation: hsd-fade-up 0.6s 0.35s cubic-bezier(0.22,1,0.36,1) both;
  }

  /* Actions */
  .hsd__actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: hsd-fade-up 0.6s 0.45s cubic-bezier(0.22,1,0.36,1) both;
  }

  .hsd__cta {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: #080810;
    padding: 0.9375rem 2rem;
    border-radius: var(--radius, 0.5rem);
    font-weight: 800;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
  }

  .hsd__cta:hover {
    background: var(--color-accent, #6366f1);
    color: #fff;
    transform: translateY(-2px);
  }

  .hsd__secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.2s, gap 0.2s;
  }

  .hsd__secondary:hover { color: rgba(255,255,255,0.85); gap: 0.65rem; }

  /* Vertical label */
  .hsd__v-label {
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    flex-shrink: 0;
  }

  .hsd__v-label-track {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    font-size: 0.625rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.18);
    writing-mode: vertical-lr;
    animation: hsd-scroll-up 20s linear infinite;
    gap: 1rem;
  }

  /* === RIGHT PANEL === */
  .hsd__right {
    position: relative;
    background: #0d0d18;
    overflow: hidden;
    animation: hsd-scale-in 1s 0.1s cubic-bezier(0.22,1,0.36,1) both;
  }

  .hsd__img-wrap {
    position: absolute;
    inset: 0;
  }

  .hsd__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
    mix-blend-mode: luminosity;
  }

  /* Remove mix-blend on hover for reveal effect */
  .hsd__right:hover .hsd__img {
    mix-blend-mode: normal;
    transition: mix-blend-mode 0s;
  }

  .hsd__vignette {
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to right, #080810 0%, transparent 20%),
      linear-gradient(to top, #080810 0%, transparent 20%);
    pointer-events: none;
  }

  .hsd__caption {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.05em;
  }

  .hsd__caption-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent, #6366f1);
    flex-shrink: 0;
  }

  /* === KEYFRAMES === */
  @keyframes hsd-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  @keyframes hsd-scale-in {
    from { opacity: 0; transform: scale(1.04); }
    to   { opacity: 1; transform: scale(1); }
  }

  @keyframes hsd-scroll-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-50%); }
  }

  @media (prefers-reduced-motion: reduce) {
    .hsd__kicker, .hsd__headline, .hsd__sub, .hsd__actions,
    .hsd__right, .hsd__v-label-track { animation: none; }
  }

  @media (max-width: 900px) {
    .hsd {
      grid-template-columns: 1fr;
      min-height: auto;
    }
    .hsd__right {
      height: 55vw;
      min-height: 280px;
      order: -1;
    }
    .hsd__v-label { display: none; }
    .hsd__left-content { padding: 3rem 1.5rem; max-width: none; }
  }
</style>

Props

Prop Type Default Beschrijving
headline * string H1 — gebruik <em> voor accentkleur
imageSrc * string Cover afbeelding rechts
kicker string Klein label met streepje boven headline
sub string Ondertitel
imageCaption string Caption overlay op afbeelding
sideLabel string Verticale scrollende tekst op de rand

* = verplicht