# Rift hero

> A gallery-minimalist hero flanked by two sculptural halftone-dot forms that stream magnetic filaments on hover, implode into the CTA button on click with a full-canvas harmonic ripple, and burst back out in fluid particle ribbons.

Most interactive heroes put a heavy 3D scene behind unreadable text or animate on an idle loop nobody asked for. Rift hero keeps a wide gallery-clean stage for your headline and primary button while flanking it with ~4,200 spring-physics halftone dots sampled live from high-contrast sculptural plates (two bundled pairs, or your own leftImage and rightImage). Moving the pointer sweeps a physical magnetic wake across the dots. Hovering the central CTA pulls live particle filaments straight off both inner edges toward the button. Clicking the CTA detaches every dot along curved vortex streamlines into the button's exact perimeter as it locks solid, firing a dual concentric harmonic shockwave across the full-viewport dot matrix. Clicking again erupts all particles back out in sweeping curl-noise ribbons that snap cleanly back into halftone formation. Everything renders in one WebGL gl.POINTS draw call with typed-array physics and sleeps at 0% CPU once settled.

## Install

```bash
npx shadcn@latest add @hairline-pro/rift-hero
```

Needs React 19, Tailwind CSS v4 and shadcn/ui theme variables (any style, light and dark). Icons from lucide-react.

- npm: `lucide-react`
- Hairline UI components it needs (the CLI installs them too): none
- Docs and live preview: https://hairlineui.com/blocks/rift-hero
- Premium block, included with All-Access (https://hairlineui.com/buy/all-access?from=blocks). Installs only with an All-Access token through the @hairline-pro registry: https://hairlineui.com/ui/installation#premium. Its source isn't public.

## Usage

```tsx
import { RiftHero } from "@/components/rift-hero";

<RiftHero
  brand="Quorum"
  eyebrow="Trusted by 500+ engineering teams"
  headline={["Where split state", "converges on contact."]}
  subheadline="One deterministic sync layer joining regions, edge workers, and live user sessions."
  actionLabel="Close the rift"
  sealedLabel="Synchronized"
  navLinks={[
    { label: "Consensus", href: "/consensus" },
    { label: "Regions", href: "/regions" },
    { label: "Docs", href: "/docs" },
  ]}
  navPrimaryAction={{ label: "Get access", href: "/signup" }}
/>
```

## With your own colour, tone and images

Set `tone="noir"` for a dark gallery canvas, override any `--rh-*` CSS variable on the root, and pass your own bright-on-black `leftImage` and `rightImage` URLs to turn any product or sculpture into live halftone particles.

```tsx
import { Plus_Jakarta_Sans } from "next/font/google";
import { RiftHero } from "@/components/rift-hero";

const sans = Plus_Jakarta_Sans({ subsets: ["latin"], weight: ["400", "500", "600", "700"] });

export default function Page() {
  return (
    <RiftHero
      className="min-h-dvh"
      tone="noir"
      scene="optics"
      style={{
        "--rh-display": sans.style.fontFamily,
        "--rh-font": sans.style.fontFamily,
        "--rh-signal": "#2ee6a6",
      } as React.CSSProperties}
      brand="Collimate"
      navLinks={[
        { label: "Sensors", href: "/sensors" },
        { label: "Calibration", href: "/calibration" },
        { label: "Docs", href: "/docs" },
      ]}
      navSecondaryAction={{ label: "Sign in", href: "/login" }}
      navPrimaryAction={{ label: "Request kit", href: "/kit" }}
      eyebrow="Sub-millimetre optical sync"
      headline={["Where split sensors", "lock into one frame."]}
      subheadline="Deterministic time-alignment for multi-camera rigs, LiDAR arrays, and autonomous robotics."
      actionLabel="Lock aperture"
      sealedLabel="Aligned · 11 µs"
      proofLabel="Deployed on flight stacks at"
      logos={[{ name: "Anduril" }, { name: "Skydio" }, { name: "Zipline" }, { name: "Ouster" }]}
    />
  );
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand` | `string` | – | Brand wordmark in the top-left nav lockup. |
| `logo` | `ReactNode` | – | Optional mark beside the brand name. |
| `navLinks` | `{ label: string; href: string }[]` | `[]` | Centered nav links; fold into a clean push-down drawer under 860px. |
| `navSecondaryAction / navPrimaryAction` | `{ label: string; href?: string; onClick?: () => void }` | – | Quiet right-side link and sharp primary nav button. |
| `eyebrow` | `string` | – | Plain single-line label above the headline in the signal colour. |
| `headline` | `string \| string[]` | – | Display headline; an array sets explicit line breaks. |
| `subheadline` | `string` | – | Short supporting copy under the headline. |
| `actionLabel / sealedLabel` | `string` | `"Close the rift" / "Synchronized"` | Resting and locked labels on the central contact CTA button. |
| `onContact` | `(sealed: boolean) => void` | – | Callback fired when the visitor clicks the CTA to seal or release the rift. |
| `autoResetMs` | `number` | `0` | Optional ms delay before automatically reforming the particles after sealing (0 keeps manual toggle). |
| `scene` | `"sphere" \| "optics"` | `"sphere"` | Bundled high-contrast studio sculpture pair loaded lazily as WebP. |
| `leftImage / rightImage` | `string` | – | Optional URLs of your own bright-on-black images to sample live into halftone particles. |
| `proofLabel / logos` | `string / { name: string; mark?: ReactNode }[]` | – | Bottom social-proof caption and monochrome partner marks. |
| `tone` | `"paper" \| "noir"` | `"paper"` | Warm alabaster paper with Swiss Vermilion dots (`paper`) or deep obsidian with mineral emerald (`noir`). |

## States

- **rest**: Two flanking sculptural forms sit razor-sharp in variable-diameter halftone dots on either side of the centered headline and CTA, sleeping at 0% CPU.
- **pointer wake**: Sweeping the cursor over either sculpture applies a spring-damped magnetic wake that parts nearby dots and rebounds smoothly.
- **CTA hover**: Hovering or focusing the primary CTA pulls live charged filaments off the inner cleaved edges straight toward the button while the remaining dots lean inward.
- **contact (sealed)**: Clicking the CTA spirals all ~4,200 particles along curved vortex paths onto the button's perimeter, flips the button solid with a vertical slot roll, and fires a dual concentric wave across the background dot matrix.
- **ribbon reform**: Clicking again bursts all particles back out in swirling curl-noise ribbons that reassemble cleanly into crisp halftone formation.
- **reduced motion**: Draws one sharp still halftone frame with no pointer wake, filaments, or particle bursts; toggling the CTA switches states cleanly in place.

## What it handles

Canvas particle heroes usually stall mobile browsers with thousands of 2D arc calls, ignore the button's actual coordinates, and break when you want to swap in your own artwork.

- **One WebGL gl.POINTS draw call**: Renders ~4,200 spring-physics halftone dots plus the full-viewport ripple matrix in a single typed-array WebGL buffer—smooth at 4× CPU and 0% CPU when settled.
- **Live hover magnetic filaments**: Hovering or focusing the central CTA pulls charged halftone streams off the inner edges of both flanking sculptures straight toward the button.
- **CTA-anchored implosion and harmonic ripple**: Measures the button's live rect so every particle spirals directly onto its perimeter while a dual concentric dot wave expands across the background.
- **Fluid curl-noise ribbon reform**: Releasing the contact erupts all particles outward along calligraphic curl-noise streamlines before snapping cleanly back onto their halftone grid.
- **Drop in any studio image**: Ships with two compact WebP sculpture pairs (cleaved marble sphere and cutaway optical lens) and samples any custom leftImage and rightImage URLs live.
- **Recomposed for phones**: Below 760px the flanking sculptures drop cleanly below the CTA so zero halftone dots cross the headline or button, with a single-column nav drawer.

## Replaces

three.js particle system, Lottie hero animation, custom halftone SVG illustration, separate navbar and logo strip

## Where it fits

- **Distributed systems, sync engines and API platforms**: Two cleaved sculptural halves visually converge on contact the moment a visitor clicks the hero CTA.
- **Hardware, robotics and optical engineering launches**: Swap to the noir tone and cutaway optical lens halves, or pass dark studio product shots through leftImage and rightImage.
- **AI labs and flagship developer tools**: Pairs gallery-level typographic restraint with a tactile physics moment visitors stop to record and share.
- **Security, settlement and zero-trust products**: Turns the primary CTA into a literal contact latch that seals scattered halves into one crisp state.

## Notes

- All colours live in --rh-* CSS variables on the section root (--rh-ground, --rh-surface, --rh-ink, --rh-ink-2, --rh-ink-3, --rh-rule, --rh-signal, --rh-dot-deep, --rh-signal-soft, --rh-on-signal, --rh-nav-btn, --rh-on-nav-btn) and never inherit from shadcn tokens.
- The WebGL renderer draws every halftone dot and background ripple dot in a single gl.POINTS draw call and sleeps at 0% CPU once particles settle or when scrolled off-screen.
- Bundled sculptural plates live in rift-hero-scenes.ts as compact WebP data URIs loaded dynamically after first paint.
- Respects prefers-reduced-motion: renders one crisp settled halftone frame with zero physics loops.

License: Hairline UI commercial license, not MIT (https://hairlineui.com/license#blocks)
