CTA Section
launchui/ctaFreeBlock
Call-to-action sections with various styles and glow effects.
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/cta.jsonSource
1import { cn } from "@/lib/utils";23import Glow from "../../ui/glow";4import { LinkButton, type LinkButtonProps } from "../../ui/link-button";5import { Section } from "../../ui/section";67interface CTAButtonProps extends Omit<LinkButtonProps, "children"> {8 text: string;9}1011interface CTAProps {12 title?: string;13 buttons?: CTAButtonProps[] | false;14 className?: string;15}1617const DEFAULT_CTA_BUTTONS: CTAButtonProps[] = [18 {19 href: "https://www.launchuicomponents.com/",20 text: "Get Started",21 variant: "default",22 },23];2425export default function CTA({26 title = "Start building",27 buttons = DEFAULT_CTA_BUTTONS,28 className,29}: CTAProps) {30 return (31 <Section className={cn("group relative overflow-hidden", className)}>32 <div className="max-w-container relative z-10 mx-auto flex flex-col items-center gap-6 text-center sm:gap-8">33 <h2 className="max-w-[640px] text-3xl leading-tight font-semibold sm:text-5xl sm:leading-tight">34 {title}35 </h2>36 {buttons !== false && buttons.length > 0 && (37 <div className="flex justify-center gap-4">38 {buttons.map((button) => (39 <LinkButton40 key={`${button.href}-${button.text}`}41 variant={button.variant || "default"}42 size="lg"43 href={button.href}44 icon={button.icon}45 iconRight={button.iconRight}46 >47 {button.text}48 </LinkButton>49 ))}50 </div>51 )}52 </div>53 <div className="absolute top-0 left-0 h-full w-full translate-y-[1rem] opacity-80 transition-all duration-500 ease-in-out group-hover:translate-y-[-2rem] group-hover:opacity-100">54 <Glow variant="bottom" />55 </div>56 </Section>57 );58}
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 | |
| 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 | |
| Hero Sectionhero | launchui | Blocks | Free | 3 deps · 8 files | |
| Items Sectionitems | launchui | Blocks | Free | 2 deps · 2 files |
