CTA banner
Full-width call-to-action band with a heading, text and one button.
Preview
A soft sheen sweeps across the band on hover or keyboard focus. With reduced motion turned on, it renders the plain layout.
Start building
Copy a section and make it yours.
Get startedStart building
Copy a section and make it yours.
Get startedInstallation
Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.
Usage
import { CtaBanner } from "@/components/custom/cta-banner";
<CtaBanner
title="Start building"
description="Copy a section and make it yours."
actionLabel="Get started"
actionHref="/signup"
/>import { CtaBannerMotion } from "@/components/custom/cta-banner/cta-banner-motion";
<CtaBannerMotion {...props} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| title* (required) | string | – | Heading of the band. |
| actionLabel* (required) | string | – | Button text. |
| actionHref* (required) | string | – | Button link. |
| description | string | – | One line under the heading. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
| Prop | Type | Default | Description |
|---|---|---|---|
| title* (required) | string | – | Heading of the band. |
| actionLabel* (required) | string | – | Button text. |
| actionHref* (required) | string | – | Button link. |
| description | string | – | One line under the heading. |
| ...props | React.ComponentProps<"section"> | – | Any other section attribute (id, aria-*, data-*, ref) goes to the root element. |
Accessibility
- The action is a plain link, so it works without JavaScript.
- The motion version follows the visitor's reduced-motion setting and never hides content before it animates.