Components
CTA Sections
Call-to-action sections are crucial for guiding users toward desired actions. These components help you create compelling CTAs that drive engagement and conversions.
Component Variants
CTA Banner
TypeScript UI v2.0 is now available!Learn more
CTA Banner (No Icon, Non-Dismissible)
Join thousands of developers building with TypeScript UI.Get started
CTA Simple (Two Buttons)
Ready to get started?
Join thousands of developers building beautiful interfaces with TypeScript UI components.
CTA Simple (Single Button)
CTA With Background (Solid)
Boost your productivity
Stop reinventing the wheel. Use our battle-tested components and ship faster.
CTA With Background (Gradient)
Build something amazing
Our component library gives you the building blocks to create stunning user interfaces.
CTA With Background (Image Overlay)
CTA Split (Image Right)
Ship faster with pre-built components
Focus on what makes your product unique while we handle the UI fundamentals. Our components are tested, accessible, and ready for production.
CTA Split (Image Left)
Designed for developers
Every component comes with full TypeScript support, comprehensive documentation, and examples you can copy and paste.
CTA Newsletter (Inline)
Stay up to date
Get notified about new components, features, and updates. No spam, unsubscribe anytime.
We respect your privacy. Unsubscribe at any time.
CTA Newsletter (Stacked)
Join our newsletter
Weekly tips, tricks, and updates delivered straight to your inbox.
We respect your privacy. Unsubscribe at any time.
Usage
import {
CTASimple,
CTAWithBackground,
CTASplit,
CTANewsletter,
CTABanner,
} from '@/components/ui/cta';
// Simple CTA
<CTASimple
title="Ready to get started?"
description="Join thousands of developers."
primaryButton={{ text: 'Get started', href: '/signup' }}
secondaryButton={{ text: 'Learn more', href: '/docs' }}
/>
// CTA With Background
<CTAWithBackground
title="Boost your productivity"
description="Use our battle-tested components."
primaryButton={{ text: 'Get started', href: '#' }}
variant="gradient" // 'solid' | 'gradient' | 'image'
backgroundImage="/bg.jpg" // for 'image' variant
/>
// CTA Split
<CTASplit
title="Ship faster"
description="Focus on what makes your product unique."
primaryButton={{ text: 'Browse', href: '#' }}
imageSrc="/image.jpg"
imageAlt="Description"
imagePosition="right" // or 'left'
/>
// CTA Newsletter
<CTANewsletter
title="Stay up to date"
description="Get notified about new features."
buttonText="Subscribe"
variant="inline" // or 'stacked'
onSubmit={(email) => console.log(email)}
/>
// CTA Banner
<CTABanner
text="New version available!"
link={{ text: 'Learn more', href: '#' }}
icon={<MegaphoneIcon />}
dismissible
/>
Props Reference
CTASimple
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Required | Main heading text |
description | string | Required | Supporting text |
primaryButton | { text: string; href: string } | Required | Primary action button |
secondaryButton | { text: string; href: string } | - | Optional secondary button |
CTAWithBackground
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Required | Main heading text |
description | string | Required | Supporting text |
primaryButton | { text: string; href: string } | Required | Primary action button |
secondaryButton | { text: string; href: string } | - | Optional secondary button |
variant | 'solid' | 'gradient' | 'image' | 'solid' | Background style |
backgroundImage | string | - | Image URL (for 'image' variant) |
CTASplit
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Required | Main heading text |
description | string | Required | Supporting text |
primaryButton | { text: string; href: string } | Required | Primary action button |
secondaryButton | { text: string; href: string } | - | Optional secondary button |
imageSrc | string | Required | Image URL |
imageAlt | string | Required | Image alt text |
imagePosition | 'left' | 'right' | 'right' | Image placement |
CTANewsletter
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | Required | Main heading text |
description | string | Required | Supporting text |
buttonText | string | 'Subscribe' | Submit button text |
placeholder | string | 'Enter your email' | Input placeholder |
variant | 'inline' | 'stacked' | 'inline' | Layout variant |
onSubmit | (email: string) => void | - | Form submit handler |
CTABanner
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | Required | Banner message |
link | { text: string; href: string } | Required | Action link |
icon | ReactNode | - | Optional icon |
dismissible | boolean | false | Show dismiss button |
onDismiss | () => void | - | Dismiss callback |