GitHub

CTALink

A link-based call-to-action block with a heading, description, action buttons, and optional features list.

Loading...

Installation

pnpm add @corew500/ui

Usage

import { CTALink } from '@corew500/ui/blocks/cta-link'

<CTALink
  heading="Ready to get started?"
  description="Start for free today. No credit card required."
  action={{ label: 'Get Started Free', href: '/signup' }}
  secondaryAction={{ label: 'View Demo', href: '/demo' }}
  features={[
    { text: 'Free 14-day trial' },
    { text: 'No credit card required' },
    { text: 'Cancel any time' },
  ]}
/>

API Reference

Props

PropTypeDefaultDescription
heading*stringMain heading
descriptionstringDescription text
action*CTALinkActionPrimary action (required)
secondaryActionCTALinkActionSecondary action button (optional)
iconenumOptional icon to display
iconPositionenumtopIcon position on desktop
gradientCTALinkGradientGradient configuration (for gradient variant)
featuresCTALinkFeature[]List of features/benefits to display
inlineLinkCTALinkInlineLinkInline text link (alternative to secondaryAction button)
variantenumdefault
alignenumleft

Accessibility

Keyboard Navigation

  • Action buttons render as proper anchor elements for keyboard navigation

Screen Readers

  • - Uses semantic <section> element with aria-label for screen readers
  • Icon uses aria-hidden="true" as it's decorative
  • Card variant wraps content in semantic section within the card

Additional

  • External links include rel="noopener noreferrer" for security
  • Feature list uses semantic <ul>/<li> elements

Localization

Translatable Content

  • - Component accepts pre-resolved translated strings
  • All user-facing text is customizable via props:
  • `heading` - Main heading text
  • `description` - Optional description text
  • `action.label` - Primary button text
  • `secondaryAction.label` - Secondary button text (if provided)
  • `features[].text` - Feature list items
  • `inlineLink.preText` / `inlineLink.linkText` - Inline link text
  • No internal text hardcoding - all strings flow through props

Related

Related Components