Skip to main content
Version: 1.0.3

Call to Action

The CTABanner component is a flexible, full-width call-to-action section designed to capture user attention and drive conversions. It features multiple layout options, visual variants, and advanced animation capabilities.

Centered Layout

1. Centered Layout

Classic centered layout perfect for most use cases. Content is centered with equal padding on all sides.

Split Layout

2. Split Layout

Split layout with content on one side and an image on the other. Great for visual storytelling.

Background Image Layout

3. Background Image

Full-width background image with optional overlay. Creates a visually striking call-to-action.

Gradient Background Layout

4. Gradient Background

Gradient overlay over a background image for modern, eye-catching designs.

Installation

ignix add component callToAction

Props

CTABanner Props

PropTypeDefaultDescription
variant'default' | 'primary' | 'secondary' | 'accent' | 'muted' | 'gradient' | 'glass' | 'dark' | 'light''default'Visual variant of the banner
layout'centered' | 'split' | 'compact' 'centered' Layout arrangement
contentAlign'left' | 'center' | 'right''center'Content alignment within the banner
backgroundType'solid' | 'gradient' | 'image''solid'Type of background styling
backgroundColorstring-Custom background color (for solid background)
gradientFromstring-Start color for gradient background
gradientTostring- End color for gradient background
backgroundImagestring-URL for background image
imagePosition'left' | 'right''right'Image position for split layout
imageVariant'light' | 'dark' | 'default''default'Image styling variant (affects brightness/contrast)
theme'light' | 'dark'-Force a specific theme (overrides variant-based theme)
forceThemebooleanfalseForce theme CSS classes
animatebooleantrueEnable/disable animations
animationDelaynumber0Initial animation delay in seconds
animationType'fade' | 'slide' | 'scale' 'fade' Type of entrance animation
padding 'sm' | 'md' | 'lg' | 'xl' | '2xl ''lg 'Vertical padding size
ariaLabel string 'Call to action banner 'Accessibility label
rolestring'banner'ARIA role
childrenReact.ReactNoderequiredBanner content components

CTABannerHeading Props

PropTypeDefaultDescription
childrenReact.ReactNoderequiredHeading text content
classNamestring-Additional CSS classes

CTABannerSubheading Props

PropTypeDefaultDescription
childrenReact.ReactNoderequiredSubheading text content
classNamestring-Additional CSS classes

CTABannerActions Props

PropTypeDefaultDescription
childrenReact.ReactNoderequiredAction buttons
classNamestring-Additional CSS classes

CTABannerButton Props

PropTypeDefaultDescription
labelstringrequiredButton text
variant'primary' | 'secondary' | 'outline' | 'ghost' | 'link''primary'Button variant
iconReact.ElementType-Optional icon component
onClick() => void-Click handler
hrefstring-Link URL (renders as anchor tag)
externalbooleanfalseOpen link in new tab
size'sm' | 'md' | 'lg'`'md' (compact layout) / 'lg' (centered/split)` Button size (auto-detected from layout if not provided)
classNamestring-Additional CSS classes

CTABannerContent Props

PropTypeDefaultDescription
childrenReact.ReactNoderequiredContent elements (heading, subheading, actions)
classNamestring-Additional CSS classes

CTABannerImage Props

PropTypeDefaultDescription
srcstringrequiredImage source URL
altstring'CTA Visual'Image alt text
classNamestring-Additional CSS classes
variant'light' | 'dark' | 'default'-Image styling variant (overrides banner's imageVariant)