BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/uifoundry/hero-2

Hero 2

uifoundry/hero-2
FreeBlock

Hero section with two-column layout, primary and secondary CTAs, and background image

Live preview

live · rendered by the registry
Rendered by uifoundry on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://uifoundry.dev/r/hero-2.json

Source

registry/payload/blocks/hero/hero-2/index.tsxuifoundry.dev/r/hero-2.json
1"use client";
2
3import Link from "next/link";
4import { Button } from "@/registry/ui/button";
5import type { Hero_2_Block } from "~/payload-types";
6import MediaField from "@/registry/default/lib/fields/media/index";
7import { cn } from "@/registry/default/utils";
8
9export default function Hero2Section(props: Hero_2_Block) {
10 return (
11 <section className="relative overflow-hidden">
12 {/* Content Container */}
13 <div className="py-24 md:pb-32 lg:pt-44 lg:pb-56">
14 <div className="relative mx-auto flex max-w-7xl flex-col px-6 lg:flex-row lg:items-center lg:px-12">
15 {/* Left Content Column */}
16 <div className="mx-auto max-w-lg text-center lg:mx-0 lg:w-1/2 lg:max-w-full lg:text-left">
17 {/* Main Heading */}
18 <h1 className="text-5xl font-semibold text-balance md:text-6xl xl:text-7xl">
19 {props.header}
20 </h1>
21
22 {/* Subheader */}
23 {props.subheader && (
24 <p className="text-muted-foreground mt-6 text-lg text-pretty">
25 {props.subheader}
26 </p>
27 )}
28
29 {/* CTA Buttons */}
30 <div className="mt-8 flex flex-col items-center justify-center gap-3 sm:flex-row lg:justify-start">
31 {/* Primary CTA */}
32 <Button
33 asChild
34 size="lg"
35 className="inline-flex h-11 items-center justify-center gap-2 rounded-lg px-6 text-base font-medium whitespace-nowrap shadow-sm"
36 >
37 <Link href={props.primaryCtaHref}>{props.primaryCtaLabel}</Link>
38 </Button>
39
40 {/* Secondary CTA */}
41 <Button
42 asChild
43 variant="outline"
44 size="lg"
45 className="inline-flex h-11 items-center justify-center gap-2 rounded-lg px-6 text-base font-medium whitespace-nowrap"
46 >
47 <Link href={props.secondaryCtaHref}>
48 {props.secondaryCtaLabel}
49 </Link>
50 </Button>
51 </div>
52 </div>
53
54 {/* Right Image Column */}
55 {props.media && (
56 <div className="relative mt-12 lg:mt-0 lg:w-1/2 lg:pl-12">
57 <div className="relative aspect-[4/3] w-full overflow-hidden rounded-2xl lg:aspect-square">
58 <MediaField
59 media={props.media}
60 width="800"
61 height="800"
62 className={cn(
63 "size-full object-cover object-center",
64 "rounded-2xl shadow-2xl",
65 )}
66 />
67 </div>
68 {/* Decorative background gradient */}
69 <div
70 aria-hidden="true"
71// … truncated

What it pulls in

npm packages

  • react
  • next

Other registry items

  • button
  • @uifoundry/header-field
  • @uifoundry/subheader-field
  • @uifoundry/media-field
  • @uifoundry/style-utils

Files it writes

  • registry/payload/blocks/hero/hero-2/index.tsx
  • registry/payload/blocks/hero/hero-2/config.ts

Facts

Registry
uifoundry
Type
registry:block
Access
Free
Files written
2
Licence
NOASSERTION
First indexed
2026-08-01
Last confirmed
2 days ago

Go to the source

Docs on uifoundry uifoundry.dev UIFoundry/uifoundry on GitHub Raw registry item This item as JSON

More from uifoundry

All 54 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Color Fieldcolor-fielduifoundryBlocksFree4 deps · 2 files
Coming Soon 1coming-soon-1uifoundryBlocksFree3 deps · 2 files
CTA 1cta-1uifoundryBlocksFree3 deps · 2 files
CTA 2cta-2uifoundryBlocksFree3 deps · 2 files
CTA 3cta-3uifoundryBlocksFree3 deps · 2 files
Custom Headercustom-headeruifoundryBlocksFree4 deps · 3 files
Features 1features-1uifoundryBlocksFree3 deps · 2 files
Features 2features-2uifoundryBlocksFree4 deps · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex