Skip to content
New

Call to action, banner

beta

A framed band with a headline revealed word by word, a line of reassurance, two calls to action and small print.

npx rasengan-ui add cta-banner

Get paid on time, starting this week

Send your first invoice in minutes. Senbon chases it for you, and your client pays in one tap.

Free for 14 days. No card needed.

Use it
Near the end of a page, to turn interest into one clear action.
Avoid it
More than two actions to offer; a page without a clear next step.
Pairs with
Footer, columns

Installation

Terminal
npx rasengan-ui add cta-banner

It installs into components/blocks/cta-banner/, with the components it uses (Button, Text reveal) and lib/blocks.ts, the field types every block shares.

Usage

Without content, the block shows its example. Pass your own, typed by the block's schema:

app/_routes/index.page.tsx
import { CtaBanner, type CtaBannerContent } from "@/components/blocks/cta-banner";
 
const content: CtaBannerContent = {
  headline: "Get paid on time, starting this week",
  subline: "Send your first invoice in minutes. Senbon chases it for you.",
  primary: { label: "Start free", href: "/signup" },
  secondary: { label: "Book a demo", href: "/demo" },
  note: "Free for 14 days. No card needed.",
};
 
export default function Home() {
  return <CtaBanner content={content} />;
}

Content that comes from elsewhere (a CMS, a file, an agent) can be checked first: schema.parse(data) throws on a missing field or a headline over 60 characters.

Content

FieldTypeLimitsGuidance
headlinestring8–60 charsThe one thing to do next, as a promise: 'Ship your landing page today'.
sublineoptionalstring≤ 140 charsOne sentence that removes a doubt: price, time, risk.
primaryobject
primary.labelstring1–32 charsA verb first, two to four words: 'Start free', 'Book a table'.
primary.hrefstringA path ('/pricing'), an anchor ('#menu'), or a full URL.
secondaryoptionalobject
secondary.labelstring1–32 charsA verb first, two to four words: 'Start free', 'Book a table'.
secondary.hrefstringA path ('/pricing'), an anchor ('#menu'), or a full URL.
noteoptionalstring≤ 60 charsSmall print under the buttons: 'No card needed'.

Props

PropNotes
contentCtaBannerContent; the example when left out
idthe section's id, for anchor links; "cta" by default
headingLevel1, 2 (default) or 3: the headline's tag, so the page keeps one h1 and an unbroken outline
classNameon the <section>, for spacing

Accessibility

  • A <section> named by its headline (aria-labelledby).
  • With motion off or reduced, the headline is simply there; it is in the server's HTML either way.
  • The actions are links, styled as buttons: they go somewhere.