Hero Section
launchui/heroFreeBlock
A hero section with badge, title, description, CTA buttons, and mockup display.
Live preview
live · rendered by the registry
Rendered by launchui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.launchuicomponents.com/r/hero.jsonSource
1import { ArrowRightIcon } from "lucide-react";2import { ReactNode } from "react";34import { cn } from "@/lib/utils";56import Github from "../../logos/github";7import { Badge } from "../../ui/badge";8import Glow from "../../ui/glow";9import { LinkButton, type LinkButtonProps } from "../../ui/link-button";10import { Mockup, MockupFrame } from "../../ui/mockup";11import Screenshot from "../../ui/screenshot";12import { Section } from "../../ui/section";1314interface HeroButtonProps extends Omit<LinkButtonProps, "children"> {15 text: string;16}1718interface HeroProps {19 title?: string;20 description?: string;21 mockup?: ReactNode | false;22 badge?: ReactNode | false;23 buttons?: HeroButtonProps[] | false;24 className?: string;25}2627const DEFAULT_HERO_BUTTONS: HeroButtonProps[] = [28 {29 href: "https://www.launchuicomponents.com/",30 text: "Get Started",31 variant: "default",32 },33 {34 href: "https://www.launchuicomponents.com/",35 text: "GitHub",36 variant: "glow",37 icon: <Github className="mr-2 size-4" />,38 },39];4041const DEFAULT_HERO_BADGE = (42 <Badge variant="outline" className="animate-appear">43 <span className="text-muted-foreground">44 New version of Launch UI is out!45 </span>46 <a href="https://www.launchuicomponents.com/" className="flex items-center gap-1">47 Get started48 <ArrowRightIcon className="size-3" />49 </a>50 </Badge>51);5253const DEFAULT_HERO_MOCKUP = (54 <Screenshot55 srcLight="/placeholder-light.svg"56 srcDark="/placeholder-dark.svg"57 alt="Launch UI app screenshot"58 width={1248}59 height={765}60 loading="eager"61 className="w-full"62 />63);6465export default function Hero({66 title = "Give your big idea the design it deserves",67 description = "Professionally designed blocks and templates built with React, Shadcn/ui and Tailwind that will help your product stand out.",68 mockup = DEFAULT_HERO_MOCKUP,69 badge = DEFAULT_HERO_BADGE,70 buttons = DEFAULT_HERO_BUTTONS,71 className,72}: HeroProps) {73 return (74 <Section75 className={cn(76 "fade-bottom overflow-hidden pb-0 sm:pb-0 md:pb-0",77 className,78 )}79 >80 <div className="max-w-container mx-auto flex flex-col gap-12 pt-16 sm:gap-24">81 <div className="flex flex-col items-center gap-6 text-center sm:gap-12">82 {badge !== false && badge}83// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from launchui
All 24 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Bento Gridbento-grid | launchui | Blocks | Free | 1 dep | |
| Carouselcarousel | launchui | Blocks | Free | 5 deps | |
| CTA Sectioncta | launchui | Blocks | Free | 1 dep · 4 files | |
| FAQ Sectionfaq | launchui | Blocks | Free | 2 deps · 2 files | |
| Feature Sectionfeature | launchui | Blocks | Free | 2 deps | |
| Footerfooter | launchui | Blocks | Free | 3 deps · 6 files | |
| Gallerygallery | launchui | Blocks | Free | 2 deps | |
| Items Sectionitems | launchui | Blocks | Free | 2 deps · 2 files |
