Skip to content
Klarhimmel UI

Call to action, band

Call to action, band previewCall to action, band preview

Install

npx shadcn add @klarhimmel/cta-band
DetailsAbout, usage, props and more

A contrasting panel with a short headline and one or two actions, to close a page.

Import

Import

import Block from '@/components/klarhimmel/blocks/cta-band';
Also called
  • 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.

Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import CtaBand from '@/components/klarhimmel/blocks/cta-band';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <CtaBand props={{
          "title": "Say what the visitor can do next",
          "description": "Say in one sentence what the first step is and what it costs.",
          "primary": {
            "label": "Main action",
            "href": "#start"
          },
          "secondary": {
            "label": "Second action",
            "href": "#contact"
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}

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.

PropTypeDefaultDescription
eyebrowstring-Text, up to 60 characters. Optional; empty is not rendered.
titlestring'Say what the visitor can do next'Text, up to 120 characters.
descriptionstring'Say in one sentence what the first …'Text, up to 900 characters.
primaryLink{…}Optional; empty is not rendered.
secondaryLink{…}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.