MenuClose

Hero Iridescent — React Hero Section

Drop-in hero: left copy over a holographic thin-film sheen — the premium product-launch look.

View source
PreviewWEBGPU
Starting live preview

Usage

import { HeroIridescent } from "@/components/HeroIridescent";

export function Landing() {
  return (
    <section style={{ height: "max(640px, 100svh)" }}>
      <HeroIridescent
        title="Your next big idea."
        subtitle="Replace this with your own story."
        primaryCta={{ label: "Get started", href: "/start" }}
        secondaryCta={null}
        interactive
        {...{
          interactive: true,
          title: "Make something memorable.",
          subtitle: "Your story. Your words. A little atmosphere from us."
        }}
      />
    </section>
  );
}
Implementation notes & API

Purpose: drop-in hero section — a full first screen with real, selectable DOM text (left layout) over a GPU iridescent background. Copy it, ship it. Mount: give the parent an explicit height (e.g. height: 100dvh or a min-height); the shell fills it and clamps its own type with container queries. Props: eyebrow, title, subtitle, primaryCta, secondaryCta, badges, scheme ("dark" | "light"), accent, plus the iridescent shader uniforms. Default copy is for demonstration. Supply your own content and CTA href or onClick; children replaces the content stack. Interaction: the iridescent background animates on its own; text and CTAs are plain DOM (WCAG AA scrim, screen-reader readable). Guardrails: WebGPU required with graceful degradation; SSR renders inert DOM; prefers-reduced-motion freezes the shader and skips the entrance animation. Do not stack two heroes on one screen.

PropertyTypeNotes / default
title / subtitleReactNodeYour content; named heroes include example copy
eyebrowstringOptional short label
primaryCta / secondaryCtastring | HeroCta | null{ label, href } or { label, onClick }; null hides the action
childrenReactNodeReplaces the entire default content stack
interactivebooleanfalse in the library; enabled in this preview
scheme"dark" | "light"dark
className / stylestring / CSSPropertiesApplied to the hero section
fallbackReactNodeContent shown if the background renderer is unavailable
View source on GitHubFree for commercial projects · MIT