Hero

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.

src/registry/ui/hero.tsx/r/hero.json

Installation#

bash
npx shadcn@latest add @minidev/hero

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.json

Usage#

tsx
import { Hero } from "@/components/ui/hero"

export function Example() {
  return (
    <Hero title="Build with Hairline" description="A registry that looks intentional." primaryAction={{ label: "Get started" }} />
  )
}

API reference#

Hero props
PropTypeDefault
eyebrowstring-
title*string-
descriptionstring-
primaryAction{ label: string; onClick?: () => void }-
secondaryAction{ label: string; onClick?: () => void }-
classNamestring-

* required

Dependencies#

npm

React only

Built from

Examples#

All Landing page sections for React and Tailwind

Learn more