Zoeken...  ⌘K GitHub

HeroNeon Hero

Dark hero met neon/glow accenten, glassmorphism knoppen en geanimeerde glow blob.

/hero-neon
src/components/hero/HeroNeon.astro
---
/**
 * HeroNeon
 * Dark hero met neon/glow accenten en glassmorphism cards.
 * Animated gradient blob op achtergrond via CSS.
 */
interface Props {
  eyebrow?: string;
  headline: string;
  sub?: string;
  ctaPrimary?: { label: string; href: string };
  ctaSecondary?: { label: string; href: string };
  glowColor?: string;
  badges?: string[];
}
const { eyebrow, headline, sub, ctaPrimary, ctaSecondary, glowColor = '#6366f1', badges = [] } = Astro.props;
---
<section class="hn" style={`--hn-glow:${glowColor}`}>
  <div class="hn-blob" aria-hidden="true"></div>
  <div class="hn-inner">
    {eyebrow && <p class="hn-eyebrow">{eyebrow}</p>}
    <h1 class="hn-headline">{headline}</h1>
    {sub && <p class="hn-sub">{sub}</p>}
    {(ctaPrimary || ctaSecondary) && (
      <div class="hn-actions">
        {ctaPrimary && <a href={ctaPrimary.href} class="hn-btn hn-btn--glow">{ctaPrimary.label}</a>}
        {ctaSecondary && <a href={ctaSecondary.href} class="hn-btn hn-btn--ghost">{ctaSecondary.label}</a>}
      </div>
    )}
    {badges.length > 0 && (
      <div class="hn-badges">
        {badges.map(b => <span class="hn-badge">{b}</span>)}
      </div>
    )}
  </div>
</section>
<style>
  .hn { position: relative; padding: 7rem 2rem 6rem; background: #080b14; color: #fff; text-align: center; overflow: hidden; }
  .hn-blob { position: absolute; top: -20%; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, color-mix(in srgb, var(--hn-glow) 30%, transparent) 0%, transparent 70%); pointer-events: none; animation: hnPulse 4s ease-in-out infinite; }
  @keyframes hnPulse { 0%,100%{transform:translateX(-50%) scale(1);opacity:.6} 50%{transform:translateX(-50%) scale(1.15);opacity:.9} }
  .hn-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
  .hn-eyebrow { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hn-glow); margin-bottom: 1.25rem; text-shadow: 0 0 20px var(--hn-glow); }
  .hn-headline { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 1.25rem; background: linear-gradient(135deg, #fff 60%, var(--hn-glow)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
  .hn-sub { font-size: 1.0625rem; color: rgba(255,255,255,0.5); line-height: 1.65; max-width: 540px; margin: 0 auto 2.5rem; }
  .hn-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
  .hn-btn { display: inline-flex; align-items: center; padding: 0.8125rem 2rem; border-radius: 0.5rem; font-size: 0.9375rem; font-weight: 600; text-decoration: none; transition: all 0.2s; }
  .hn-btn--glow { background: var(--hn-glow); color: #fff; box-shadow: 0 0 30px color-mix(in srgb, var(--hn-glow) 50%, transparent); }
  .hn-btn--glow:hover { box-shadow: 0 0 50px color-mix(in srgb, var(--hn-glow) 70%, transparent); transform: translateY(-1px); }
  .hn-btn--ghost { border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.7); backdrop-filter: blur(8px); background: rgba(255,255,255,0.05); }
  .hn-btn--ghost:hover { border-color: rgba(255,255,255,0.3); color: #fff; }
  .hn-badges { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
  .hn-badge { font-size: 0.6875rem; padding: 0.3rem 0.75rem; border: 1px solid rgba(255,255,255,0.1); border-radius: 100px; color: rgba(255,255,255,0.4); backdrop-filter: blur(4px); }
</style>

Props

Prop Type Default Beschrijving
headline * string H1 tekst
eyebrow string Label boven headline
sub string Ondertitel
ctaPrimary { label: string; href: string } Primaire CTA
ctaSecondary { label: string; href: string } Secundaire CTA
glowColor string '#6366f1' Neon glow kleur (CSS kleur)
badges string[] Trust badges onderaan

* = verplicht