CTA 2
uifoundry/cta-2FreeBlock
Dark background CTA with responsive horizontal layout, header, and dual action buttons
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/cta-2.jsonSource
1/**2 * CTA 2 Component3 *4 * Source: Based on shadcnblocks.com CTA design pattern5 * License: MIT-licensed shadcn pattern6 * Adapted from: User-provided screenshots7 *8 * Modifications:9 * - Integrated with PayloadCMS block system10 * - Replaced hardcoded content with dynamic props11 * - Made fully responsive with mobile-first approach12 */1314import Link from "next/link";1516import type { CTA_2_Block } from "~/payload-types";1718import { Button } from "@/registry/ui/button";1920export * from "./config";2122export default function CallToAction2(props: NonNullable<CTA_2_Block>) {23 const primaryAction = props.actions?.[0];24 const secondaryAction = props.actions?.[1];2526 return (27 <section className="bg-neutral-950 py-16 md:py-20">28 <div className="mx-auto max-w-7xl px-6">29 <div className="flex flex-col items-center text-center gap-6 md:flex-row md:justify-between md:text-left md:items-center">30 <h2 className="text-3xl font-bold text-white text-balance lg:text-4xl md:max-w-2xl">31 {props.header}32 </h2>3334 <div className="flex flex-col items-center gap-4 md:flex-row md:items-center md:gap-6 shrink-0">35 {secondaryAction && (36 <Link37 href={secondaryAction.href ?? "/"}38 className="text-white hover:text-white/80 transition-colors text-sm md:text-base"39 >40 {secondaryAction.label ?? "Learn more"}41 </Link>42 )}4344 {primaryAction && (45 <Button46 asChild47 size="lg"48 className="bg-white text-black hover:bg-white/90"49 >50 <Link href={primaryAction.href ?? "/"}>51 <span>{primaryAction.label ?? "Get started"}</span>52 </Link>53 </Button>54 )}55 </div>56 </div>57 </div>58 </section>59 );60}
What it pulls in
npm packages
Other registry items
Files it writes
More from uifoundry
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Color Fieldcolor-field | uifoundry | Blocks | Free | 4 deps · 2 files | |
| Coming Soon 1coming-soon-1 | uifoundry | Blocks | Free | 3 deps · 2 files | |
| CTA 1cta-1 | uifoundry | Blocks | Free | 3 deps · 2 files | |
| CTA 3cta-3 | uifoundry | Blocks | Free | 3 deps · 2 files | |
| Custom Headercustom-header | uifoundry | Blocks | Free | 4 deps · 3 files | |
| Features 1features-1 | uifoundry | Blocks | Free | 3 deps · 2 files | |
| Features 2features-2 | uifoundry | Blocks | Free | 4 deps · 2 files | |
| Features 3features-3 | uifoundry | Blocks | Free | 4 deps · 2 files |
