# Cloudbreak hero

> A hero for SaaS and AI products: your product screen standing in a live sea of clouds. The fog parts on load, cloud tops drift over the screen, and the pointer clears the haze.

Most SaaS heroes put a screenshot on a gradient. Cloudbreak hero puts it in a place. A live sky fills the section: a graded dome with the sun (or the moon and stars at night), high cumulus drifting, and a sea of clouds running in perspective to the horizon. Your product screen stands in that sea. On load the hero is fogged in: the headline comes into focus as the fog parts from the middle outward, and the screen rises out of the clouds. Then cloud tops keep billowing over its lower half and thin wisps cross in front of it, so it reads as sitting in the sky rather than pasted over it; move the mouse and the clouds thin around the pointer, uncovering the screen where you look. The sky is a shader drawn into two canvases (one behind the screen, one in front), in day, golden-hour and night tones, and your screen is your own markup or image, with a separate composition for phones.

## Install

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

<CloudbreakHero
  brand="Altitude"
  headline={["See your product", "from above"]}
  subheadline="Altitude turns every click into answers."
  primaryAction={{ label: "Start free", href: "/signup" }}
  screen={<img src="/dashboard.png" alt="" className="size-full object-cover object-top" />}
  screenLabel="The Altitude dashboard"
/>
```

## A whole first screen

Nav, copy, sky and screen are one section. Lay your screen out at 1120 × 700 (or set screenWidth and screenHeight), give phones their own 390 × 560 composition, and pick the sky.

```tsx
import { CloudbreakHero } from "@/components/cloudbreak-hero";
import { Lock, Sparkles, Star } from "lucide-react";
import { Dashboard, DashboardPhone } from "@/components/dashboard-preview";

export default function Page() {
  return (
    <main>
      <CloudbreakHero
        className="min-h-dvh"
        tone="day"
        brand="Altitude"
        navLinks={[
          { label: "Product", href: "/product" },
          { label: "Ask Altitude", href: "/ai" },
          { label: "Customers", href: "/customers" },
          { label: "Pricing", href: "/pricing" },
        ]}
        navAction={{ label: "Start free", href: "/signup" }}
        headline={["See your product", "from above"]}
        subheadline="Altitude turns every click into answers: what changed, who it changed for, and what to ship next."
        primaryAction={{ label: "Start free", href: "/signup" }}
        secondaryAction={{ label: "Book a demo", href: "/demo" }}
        proof={[
          { icon: <Star className="size-3.5 fill-current" />, label: "4.8 on G2 from 612 reviews" },
          { icon: <Lock className="size-3.5" />, label: "SOC 2 Type II" },
          { icon: <Sparkles className="size-3.5" />, label: "Answers cite their data" },
        ]}
        screen={<Dashboard />}
        screenMobile={<DashboardPhone />}
        screenLabel="The Altitude dashboard: weekly active users and an AI answer"
        style={{ "--cb-display": "var(--font-display)", "--cb-signal": "#ffc23d" } as React.CSSProperties}
      />
    </main>
  );
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `brand` | `string` | – | Name in the nav pill. |
| `logo` | `ReactNode` | – | Mark beside the name. Defaults to a small cloud tile. |
| `navLinks` | `{ label: string; href: string }[]` | – | Links in the nav pill; under 832px they fold into a menu under it. |
| `navAction` | `{ label: string; href?: string; onClick?: () => void }` | – | The dark pill with a round arrow at the right of the nav. |
| `headline` | `string \| string[]` | – | The headline; an array sets the line breaks. |
| `subheadline` | `string` | – | One plain sentence about what the product does. |
| `primaryAction / secondaryAction` | `{ label: string; href?: string; onClick?: () => void }` | – | A signal-coloured pill with a round arrow, and a quiet pill. |
| `proof` | `{ icon?: ReactNode; label: string }[]` | – | A short row of plain facts under the actions. |
| `screen` | `ReactNode` | – | Your product screen: markup or an image, laid out at screenWidth × screenHeight and scaled to fit. |
| `screenMobile` | `ReactNode` | – | The screen composed for phones, laid out at 390 × 560. Falls back to screen. |
| `screenWidth / screenHeight` | `number` | `1120 / 700` | The size the screen is laid out at. |
| `screenLabel` | `string` | – | What the screen shows, for screen readers. |
| `tone` | `"day" \| "golden" \| "night"` | `"day"` | The sky. Each sets the shader's colours and the section's --cb-* variables, which you can override. |

## States

- **fog**: At load a fog bank covers the screen and the sky; the headline and its line start blurred (14px) and faint.
- **break**: From 0.15s the fog parts from the middle outward over 1.9s along billowing edges; the headline comes into focus over 1.5s and the screen rises 90px out of the clouds over 1.7s.
- **drift**: Cloud tops keep billowing over the screen's lower half, wisps cross in front of it and the high cumulus drift; the loop runs at 30 fps when nothing else is moving.
- **clear**: With a mouse, the clouds in front thin out in a soft circle around the pointer, easing in and out as it moves or leaves.
- **reduced motion**: The sky is drawn once with the fog gone; no blur, no rise, no drift. The pointer still clears the haze, redrawn per move.

## What it handles

Landscape heroes are rendered once in a 3D tool: a heavy image that never moves, and the product is pasted on top of it rather than standing in it.

- **A sky that's alive**: Clouds are drawn by a shader every frame: domain-warped noise for billows, light from the sun's side, a perspective sea that hazes into the horizon, stars at night.
- **The screen stands in it**: Two canvases sandwich your screen: the far sky behind it, the near cloud tops and wisps in front. Where the screen stands sets where the horizon and the cloud line fall, so it stays seated at every width.
- **Your screen, two compositions**: Pass your product UI as markup or an image, laid out at a fixed width and scaled to fit, plus a phone layout at 390px so phones never get a shrunken desktop.
- **Cheap to run**: Clouds are rendered at half resolution, drop to 30 fps once the fog has gone and the pointer is still, and stop off screen and in background tabs.
- **Three skies**: Day, golden hour and night each set the sky, the clouds' light and shade, the sun or moon, and the section's --cb-* variables for type, pills and the signal-coloured action.
- **Fails soft**: Without WebGL the section keeps its gradient sky and the screen; with reduced motion the sky is drawn once, clear, with no fog, rise or drift.

## Replaces

3D landscape render, hero background video, Spline scene, stock sky photo, Lottie animation

## Where it fits

- **Analytics and AI insight products**: Clarity is the promise: the fog lifts off the dashboard on load, and the pointer clears the haze over the numbers.
- **Cloud, infrastructure and cost tools**: Above-the-clouds is the category's own picture; the night sky suits monitoring and on-call products.
- **Fintech and planning apps**: A calm, sunlit first screen for money products, with the real app in it instead of a stock illustration.
- **Any SaaS launch**: Drop in your app screen and a phone composition; the sky does the rest in three tones.

## Notes

- The sky is one WebGL fragment shader drawn into two canvases at half resolution: one behind the screen, one in front. It runs only while the hero is on screen and the tab is visible, and drops to 30 fps when nothing but the drift is moving.
- The horizon and the cloud line follow the screen: they are measured from where the screen stands, again on every resize.
- The section's colours are --cb-* variables (ink, pills, signal, frame) and never read your shadcn theme; the sky's colours come from the tone.
- Type follows your page font; set --cb-display for the headline and brand and --cb-font for the rest. The examples use Albert Sans.
- Without WebGL the section shows its gradient sky and the screen. Respects prefers-reduced-motion: the sky is drawn once with the fog gone.

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