Docs/SUPREME/Parallax Hero
SupremeExclusive

An ultra-premium, interactive 3D spring-physics parallax hero block styled with a cinematic dark aesthetic, thinned spotlight vector hover backdrop, and a glowing gradient ambient shadow header. Built for high performance and visual excellence.

Installation#

$ pnpm dlx @gwenui/cli add parallax-hero

File Structure#

parallax-hero/
├── index.tsx                      # Main entry point (ParallaxHero)
├── components/
   ├── FloatingImage.tsx          # Depth card with spring physics
   └── TextHoverEffect.tsx        # SVG spotlight hover backdrop
└── block.json                     # Block metadata configuration

Usage#

import { ParallaxHero } from "@/components/blocks/parallax-hero";
 
export default function Page() {
  return (
    <ParallaxHero
      headline="Build the future, one pixel at a time."
      description="GwenUI gives you premium blocks to ship faster."
      primaryCta="Get Started"
      secondaryCta="View Blocks"
      bgText="GWEN"
    />
  );
}

Props#

PropTypeDefaultDescription
headlinestringrequiredMain hero title rendered in Lora Serif with glowing backlight shadow.
descriptionstringundefinedDescription paragraph below the title.
primaryCtastringrequiredLabel for the primary CTA button.
secondaryCtastringrequiredLabel for the secondary outline button.
bgTextstring"GWEN"Massive word rendered as the thinned SVG spotlight backdrop.
layersParallaxImageLayer[]5 defaultsFloating depth card configuration (src, depth, offset, dimensions, rotation).
onPrimaryClick() => voidundefinedClick handler for the primary CTA.
onSecondaryClick() => voidundefinedClick handler for the secondary CTA.
classNamestring""Extra CSS classes on the root container.

ParallaxImageLayer Type#

interface ParallaxImageLayer {
  src: string
  depth: number        // Positive = foreground, negative = background movement
  xOffset: string      // CSS positioning (e.g. "left-[8%] top-[12%]")
  yOffset?: string
  width: number
  height: number
  rotation?: number
  zIndex: number
  alt: string
}

Performance & Quality#

  • Zero Layout Shifts (CLS): Card containers are pre-seeded with precise width and height bounds.
  • Optimized Assets: WebP layers pruned from 6.43 MB to 598 KB — a 90% reduction.
  • Strict TypeScript: 100% type-safe with strict compile parameters.
  • Font Harmony: Lora serif for cinematic focus, Plus Jakarta Sans for UI elements.

Dependencies#

PackagePurpose
framer-motionSpring inertia & mouse tracking
lucide-reactVector icon library
@radix-ui/react-slotAccessible button composition
Next.js 14+TypeScriptTailwind CSS v4Framer Motion
Made by JinXSuper with Gwen 🧡