# Reed hero

> A navy and cream hero behind fluted glass. A warm lamp drifts behind the reeds and follows the pointer, a click ripples the glass, and the next departures sit on a glass board along the bottom.

Travel and hospitality heroes usually put a stock photo behind a search bar. Reed hero builds a calm night sea in WebGL2 and lays fluted glass over it: every reed is a small lens that squeezes and flips the light behind it. On load the reeds sweep in from the left. A warm lamp drifts behind the glass and follows the pointer, smeared into streaks by the reeds, and a click sends a ripple through them. A light headline sits on the left; the next departures (or bookings, or sessions) sit on a glass board along the bottom, the first one live. The bar carries the brand, a live clock for your place, and the links in a fluted pill.

## Install

```bash
npx shadcn@latest add @hairline-pro/reed-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/reed-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 { ReedHero } from "@/components/reed-hero";

<ReedHero
  brand="Ferrylight"
  navLinks={[{ label: "Sailings", href: "/sailings", active: true }, { label: "Islands", href: "/islands" }]}
  navAction={{ label: "Book", href: "/book" }}
  clockPlace="Oban"
  clockZone="Europe/London"
  headline={["The crossing is", "half the holiday."]}
  subheadline="Every sailing to the islands in one timetable."
  primaryAction={{ label: "Find a sailing", href: "/find" }}
  departures={[
    { route: "Oban → Craignure", depart: "07:40", arrive: "08:26", status: "Boarding", live: true },
    { route: "Oban → Colonsay", depart: "09:15", arrive: "11:35", status: "38 seats" },
  ]}
/>
```

## Your face and your sea

ReedHero reads type from --rh-display and --rh-sans and every colour from --rh-* variables, the sea and the lamp included.

```tsx
import { Inter_Tight } from "next/font/google";
import { ReedHero } from "@/components/reed-hero";

const face = Inter_Tight({ subsets: ["latin"], weight: ["300", "400", "500"] });

<ReedHero
  style={{
    "--rh-display": face.style.fontFamily,
    "--rh-sans": face.style.fontFamily,
    "--rh-deep": "#141b24",
    "--rh-mid": "#2f3d4a",
    "--rh-glow": "#ffd9a8",
  } as React.CSSProperties}
  brand="Saltbox"
  headline={["Small rooms,", "big windows."]}
  subheadline="Six rooms above the harbour, booked straight from here."
  primaryAction={{ label: "See tonight", href: "/tonight" }}
  boardTitle="Tonight"
  departures={[{ route: "Room 3 · Sea view", depart: "Fri 14", arrive: "Sun 16", status: "2 left", live: true }]}
/>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand / logo` | `string / ReactNode` | – | Wordmark and mark in the bar. |
| `navLinks` | `{ label; href; active? }[]` | – | Links in the fluted pill; the active one gets a dot. |
| `navAction` | `{ label; href?; onClick? }` | – | The cream button at the end of the pill. |
| `clockPlace / clockZone` | `string` | – | A live clock in the bar: the place’s name and its IANA time zone. |
| `eyebrow` | `string` | – | One plain line above the headline. |
| `headline` | `string[]` | – | Two or three lines; each rises out of its slot on load. |
| `subheadline` | `string` | – | One sentence. |
| `primaryAction / secondaryAction` | `{ label; href?; onClick? }` | – | Cream pill and a quiet link. |
| `boardTitle` | `string` | `"Next departures"` | Label on the board. |
| `departures` | `{ route; depart; arrive; status; live?; href? }[]` | – | Up to four entries on the board. |

## States

- **arrival**: The reeds sweep in from the left over the sea while the headline lines rise out of their slots and the board fades up.
- **lamp**: The warm lamp eases toward the pointer and its light streaks through the reeds; it drifts again when the pointer leaves.
- **ripple**: A click off the controls sends a ripple both ways through the glass.
- **board**: Clicking a departure selects it; the first one shows a live status.
- **phone**: Under 860px the links fold into a glass sheet; the board scrolls sideways.
- **reduced motion**: One still frame with the reeds in place; no lamp and no ripples.

## What it handles

A glass-and-light hero usually means a looping video or a heavy 3D scene behind the text, and a booking widget bolted on top.

- **Fluted glass in one shader**: The sea is drawn at a third of the resolution, then every reed refracts it at full resolution with a highlight and a shadow on its edges.
- **A lamp you move**: A warm light drifts on its own and eases toward the pointer, so moving the mouse paints streaks of light through the reeds.
- **Ripples on click**: A click anywhere off the controls sends a ripple both ways through the glass.
- **Live board**: Departures, rooms or sessions on a glass board: route, two times, a status, the first one marked live. It scrolls sideways on phones.
- **A bar from the same glass**: A live clock for your place and the links in a fluted pill; on phones, a glass sheet.
- **Light on the battery**: The sea drifts at half the frame rate unless something moves, and stops when the hero is off screen or the tab is hidden.

## Replaces

background video, three.js scene, booking card widget

## Where it fits

- **Ferries, trains and travel booking**: The board shows the next departures with times and seats, the first one boarding.
- **Hotels, cabins and stays**: Use the board for tonight’s rooms: name, check-in and check-out, nights left.
- **Studios, spas and classes**: Next sessions with times and places left, booked from the hero.
- **Calm consumer brands**: Any product that wants a quiet, premium first screen with something live on it.

## Notes

- Colours: --rh-deep, --rh-mid, --rh-haze, --rh-glow (the sea and the lamp), --rh-ink, --rh-ink-2, --rh-ink-3, --rh-glass, --rh-glass-edge, --rh-cream, --rh-on-cream, --rh-live. They never inherit your shadcn theme.
- The canvas is capped at about 2.4 million pixels and the sea is drawn at a third of that; it runs at half the frame rate when nothing moves and stops off screen.
- Needs WebGL2; without it the hero shows the deep colour and everything else works.
- The canvas is aria-hidden; the bar, actions and board are links and buttons.

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