Skip to content
Klarhimmel UI

Call to action, card

Call to action, card previewCall to action, card preview

Install

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

A contained, rounded card with a centred headline, two actions and a row of short reassurances (no card needed, cancel any time).

Import

Import

import Block from '@/components/klarhimmel/blocks/cta-card';
Also called
  • cta/card
About
A contained, rounded card with a centred headline, two actions and a row of short reassurances (no card needed, cancel any time). Sits inside the page column instead of spanning it.
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 contained rounded card with a centred headline, two buttons and a row of short reassurances, sitting inside the page column. Use cta-band when you want full contrast and no reassurance row.

Writing for it

- The points are short check items of up to 80 characters, at most four, and they work best as objections answered: 'No card needed', 'Cancel any time'. - The note (120) is small print under the points. Use it for a fact such as a refund window, not a second slogan. - Eyebrow (60) and description (300) are optional; the title (120) alone can carry a card whose buttons say the rest.

Watch out for

The points row and the note vanish when empty, and an empty primary or secondary label removes that button, so a card with no label on either link is just text. The card is capped at the narrow column width.

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 CtaCard from '@/components/klarhimmel/blocks/cta-card';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <CtaCard props={{
          "eyebrow": "Name the section",
          "title": "Say what the visitor can do next",
          "description": "Say in a sentence or two what the first step is, what it costs and how fast it goes.",
          "primary": {
            "label": "Main action",
            "href": "/signup"
          },
          "secondary": {
            "label": "Second action",
            "href": "/contact"
          },
          "points": [
            "First reassurance",
            "Second reassurance",
            "Third reassurance"
          ],
          "note": "Say who already uses it, with a number"
        }} />
      </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'Name the section'Text, up to 60 characters.
titlestring'Say what the visitor can do next'Text, up to 120 characters.
descriptionstring'Say in a sentence or two what the f…'Text, up to 300 characters.
primaryLink{…}See the type.
secondaryLink{…}See the type.
pointsstring[]3 itemsList of up to 4.
notestring'Say who already uses it, with a num…'Text, up to 120 characters.
panel'card' | 'plain'-One of 'card', 'plain'. Optional; empty is not rendered.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.