Call to action, band


Install
npx shadcn add @klarhimmel/cta-bandDetailsAbout, usage, props and more
A contrasting panel with a short headline and one or two actions, to close a page.
Import
Import
- cta/banner
- Category
- One clear next step near the end of a page. New project? Set it up once: /get-started/installation.
Notes
When to use it
A dark, contrasting panel with a short headline and up to two buttons, placed at the end of a page. For a version with an image use cta-split; for a quieter, type-only ending use cta-minimal.
Writing for it
- The title holds 120 characters but sits in a panel beside the buttons, so around 50 reads best, as one action-led sentence. - The description allows 240 characters; use it for the reassurance the button cannot give, such as what happens after the click. - Primary is drawn as the accent button and secondary as a ghost button. Make the secondary a softer alternative like 'Talk to us', not the same action reworded.
Watch out for
Every text field and both links are optional and nothing is required, so a band with its fields cleared leaves an empty dark panel on the page. The panel sets its own inverse tone, so do not place it directly against a dark footer.
Pairs well with
Usage
The block in a page, with its default content (long lists shortened). Every prop is in the table below.
Props
The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.
| Prop | Type | Default | Description |
|---|---|---|---|
eyebrow | string | - | Text, up to 60 characters. Optional; empty is not rendered. |
title | string | 'Say what the visitor can do next' | Text, up to 120 characters. |
description | string | 'Say in one sentence what the first …' | Text, up to 900 characters. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
panel | 'contrast' | 'plain' | - | One of 'contrast', 'plain'. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |