CTASection
Invite visitors to a consumer-defined next step with responsive call-to-action layouts and optional media.
CTASection composes a message, optional media, actions, and custom children. It does not implement a newsletter form, download, trial, contact flow, or application behavior; consumers provide those elements.
Beta API maturity: Beta.
Installation
import { CTASection } from "@puzzle-ui/pieces";Variant previews
Each preview shares the same typed content slots while applying its named composition. Theme and background behavior inherit from the shared UI section props.
centered - A focused message with centered actions.
split - A call to action beside consumer-provided media.
banner - A compact banner near the end of a page.
card - A contained action within a card-like surface.
full-width - A broad call to action spanning the section.
image - A message paired with an image or illustration.
background - A call to action with consumer-styled background media.
gradient - A themed gradient treatment using design tokens.
newsletter - A prompt whose form is supplied by the consumer.
trial - A product trial invitation with a clear next step.
download - A download prompt with consumer-provided actions.
contact - A direct invitation to contact the organization.
app - A promotion for a mobile or desktop application.
minimal - A restrained final prompt with little decoration.
editorial - A text-led call to action in an article layout.
floating - A compact, contained prompt separated from page content.
API
| Prop | Type | Description |
|---|---|---|
variant | CTAVariant | Selects one of sixteen call-to-action presentations; defaults to centered. |
title / description / eyebrow | ReactNode | Shared section heading content. |
primaryAction / secondaryAction | ReactNode | Consumer-provided next steps. |
media | ReactNode | Optional consumer-provided media. |
children | ReactNode | Additional composable content such as a form. |
| Shared section props | SectionRootProps | Semantic root, theme, native attributes, width, and spacing. |
Usage
<CTASection
variant="trial"
title="Ready to get started?"
description="Try the workflow with your team."
primaryAction={<a href="/signup">Start a trial</a>}
secondaryAction={<a href="/docs">Read the guide</a>}
/>The action slots are omitted when not supplied. Provide links, buttons, forms, and their loading/error behavior from the consuming application.
Accessibility
Use descriptive action names and maintain a logical heading level. If a form is passed through children, provide its own labels, validation messages, and submission feedback.