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.
Installation
npx shadcn@latest add @minidev/hero-spotlight
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/hero-spotlight.json
Usage
import { HeroSpotlight } from "@/components/ui/hero-spotlight"
export function Example() {
return (
<HeroSpotlight />
)
}
API reference
| Prop | Type | Default |
|---|---|---|
| eyebrowPill above the title with a live dot, e.g. "Now in public beta". | React.ReactNode | "Now in public beta" |
| titleFirst line of the h1. | React.ReactNode | "Answers from your data," |
| highlightSecond line of the title, lit by the cursor. | React.ReactNode | "before you ask." |
| descriptionParagraph under the title. | React.ReactNode | "Lumen watches revenue, churn and pip... |
| primaryMain call to action, solid with an arrow. | HeroAction | { label: "Start free" } |
| secondarySecond call to action, outline. | HeroAction | { label: "Watch the 2 min tour" } |
| proofSmall proof line under the actions. | React.ReactNode | "Free for 14 days · No card · SOC 2 T... |
| visualProduct visual (a DeviceFrame, a screenshot, anything). | React.ReactNode | - |
| alignText alignment of the copy block. | "center""left" | "center" |
| className | string | - |
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.
Accessibility
titleandhighlightrender 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 hasmotion-reduce:hidden. - Under reduced motion the entrance props are left out and the visual's
initialisfalse, so nothing blurs, rises or tilts on load.
Frequently asked questions
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 once in your layout to move the light with the pointer. Without it the light stays at its default top-left position.
Dependencies
npm
Built from