# Hero Spotlight

> A launch hero with a pulsing eyebrow, blur-in headline with a cursor lit second line, two actions, a proof line and a product visual that tilts into place.

- Kind: Block (Landing pages)
- Docs: https://ui.minidev.pro/docs/hero-spotlight
- Source (registry JSON with the full file): https://ui.minidev.pro/r/hero-spotlight.json
- License: MIT. One file, yours to edit after install.

## When to use

Use as the first section of a landing page (it renders the page's h1, so use it once). Pair `visual` with a DeviceFrame wrapping real UI. Entrance motion is skipped under reduced motion. For a plain hero with no motion use Hero; for premium backgrounds use HeroAurora. Actions render as links when `href` is set, buttons otherwise.

## Installation

### shadcn CLI (copies the source into your project)

```bash
npx shadcn@latest add @minidev/hero-spotlight
```

Writes `components/ui/hero-spotlight.tsx` plus the MiniDev files it is built from (button) and installs its npm dependencies. Older CLI versions: `npx shadcn@latest add https://ui.minidev.pro/r/hero-spotlight.json`.

### npm package

```bash
npm i minidev-ui-kit lucide-react motion
```

Add the tokens to your global stylesheet once:

```css
@import "tailwindcss";
@import "minidev-ui-kit/styles.css";
@source "../node_modules/minidev-ui-kit";
```

Next.js also needs `transpilePackages: ["minidev-ui-kit"]` in next.config.

## Import

After the shadcn install:

```tsx
import { HeroSpotlight } from "@/components/ui/hero-spotlight"
```

From the npm package:

```tsx
import { HeroSpotlight } from "minidev-ui-kit/blocks/hero-spotlight"
```

## Usage

```tsx
import { HeroSpotlight } from "@/components/ui/hero-spotlight"

export function Example() {
  return (
    <HeroSpotlight />
  )
}
```

## Props

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `eyebrow` | `React.ReactNode` | `"Now in public beta"` | no | Pill above the title with a live dot, e.g. "Now in public beta". |
| `title` | `React.ReactNode` | `"Answers from your data,"` | no | First line of the h1. |
| `highlight` | `React.ReactNode` | `"before you ask."` | no | Second line of the title, lit by the cursor. |
| `description` | `React.ReactNode` | `"Lumen watches revenue, churn and pip...` | no | Paragraph under the title. |
| `primary` | `HeroAction` | `{ label: "Start free" }` | no | Main call to action, solid with an arrow. |
| `secondary` | `HeroAction` | `{ label: "Watch the 2 min tour" }` | no | Second call to action, outline. |
| `proof` | `React.ReactNode` | `"Free for 14 days · No card · SOC 2 T...` | no | Small proof line under the actions. |
| `visual` | `React.ReactNode` | - | no | Product visual (a DeviceFrame, a screenshot, anything). |
| `align` | `"center" \| "left"` | `"center"` | no | Text alignment of the copy block. |
| `className` | `string` | - | no |  |

## Accessibility

- `title` and `highlight` render in one `<h1>`, separated by a `<br />`, so the two lines read as one heading.
- The live dot in the eyebrow and the arrow icon are `aria-hidden`. The dot's ping animation has `motion-reduce:hidden`.
- Under reduced motion the entrance props are left out and the visual's `initial` is `false`, so nothing blurs, rises or tilts on load.

## FAQ

### How do I hide the eyebrow, highlight line or proof text?

Pass an empty string, for example `eyebrow=""` or `proof=""`. Passing `undefined` brings back the sample text, because these props have defaults. The actions are objects with defaults too, so to drop the second button remove `act(secondary, "outline")` from the copied file.

### How do I link the buttons to my signup page?

Give the action an `href`: `primary={{ label: "Start free", href: "/signup" }}`. It then renders the `Button` with `render={<a href="/signup" />}`. Without `href` it is a `<button>` that calls `onClick`.

### Why doesn't the highlight follow my cursor?

The `text-lit` highlight and the `light-spot` glow read the `--lx` and `--ly` light variables from the kit stylesheet. Mount [`LightProvider`](https://ui.minidev.pro/docs/light-provider) once in your layout to move the light with the pointer. Without it the light stays at its default top-left position.

## Rules for generating code

- Use semantic tokens only (bg, surface, sunken, border, fg, fg-muted, fg-subtle, ink, accent, success, warning, danger). Never raw hex or palette steps like blue-500.
- Shadows only from the set: shadow-xs, shadow-sm, shadow-raised, shadow-md, shadow-lg, shadow-overlay.
- Numbers use tabular-nums. Dark mode is the `dark` class on <html>; components never branch on theme.

## Dependencies

- npm: `lucide-react`, `motion`
- Built from: [button](https://ui.minidev.pro/docs/button/md)

## Related

- [Device Frame](https://ui.minidev.pro/docs/device-frame/md): Wraps any React UI in a phone with notch, status bar and side buttons, or a browser window with a URL bar. Built from theme tokens for light and dark.
- [Hero](https://ui.minidev.pro/docs/hero/md): A centered landing page hero with an optional eyebrow, a large headline, supporting copy and up to two call to action buttons. A plain Tailwind starting point.
- [Hero Aurora](https://ui.minidev.pro/docs/hero-aurora/md): A React hero with slow drifting aurora gradient blobs behind an eyebrow, headline, description and two action buttons that fade up in sequence.
- [Floating Nav](https://ui.minidev.pro/docs/floating-nav/md): A sticky marketing navbar that tucks into a floating pill after you scroll, with a hover highlight that glides between links and an animated mobile menu.
- [Marketing Landing](https://ui.minidev.pro/docs/marketing-landing/md): A complete Tailwind landing page assembled from a hero with two actions, a logo cloud, a stats strip, a three column feature grid and a closing CTA banner.
- [Bento Live](https://ui.minidev.pro/docs/bento-live/md): A React bento feature grid where each tile runs a live demo: a rolling MRR counter, a typed AI answer, ranked alerts and an orbiting integrations ring.

---

All 557 components: https://ui.minidev.pro/llms.txt (full text: https://ui.minidev.pro/llms-full.txt).
