Call to action, by audience


Install
npx shadcn add @klarhimmel/cta-audiencesDetailsAbout, usage, props and more
Two or three side-by-side cards, one per kind of visitor (for guests, for owners, for agencies), each with its own short pitch, up to three points and its own action.
Import
Import
- cta/audiences
- About
- Two or three side-by-side cards, one per kind of visitor (for guests, for owners, for agencies), each with its own short pitch, up to three points and its own action. The first card is filled. For a site with more than one front door.
- 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
Two or three cards, each for a different kind of visitor, with its own pitch, up to three points and an action. Use it when the site has several front doors. With a single audience, cta-card is the simpler close.
Writing for it
- The audience name is required and holds 40 characters; write it as the visitor ('For guests', 'For owners'), not as your product tier. - Each description takes 160 characters and each of the up to three points 80. Make the points differ between cards, since identical lists make the split pointless. - The cta on every card has its own label and href, so send each to a page made for that audience rather than to one shared form.
Watch out for
Only the first card is styled as the main one: accent border, tinted background and a primary button. Order the audiences so the group you most want comes first. The schema allows two or three cards, never one or four.
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 | 'Name the section' | Text, up to 60 characters. |
title | string | 'Say how the choices differ, in one …' | Text, up to 120 characters. |
description | string | 'Say in a sentence how to choose bet…' | Text, up to 300 characters. |
align | 'center' | 'start' | - | One of 'center', 'start'. Optional; empty is not rendered. |
highlightFirst | boolean | - | Optional; empty is not rendered. |
layout | 'cards' | 'joined' | 'halves' | - | One of 'cards', 'joined', 'halves'. Optional; empty is not rendered. |
audiences | { name, description, points, cta, icon }[] | 3 items | List of 2 to 3. Each item: name, description, points, cta, icon ('zap' | 'shield' | 'layers' | 'globe' | 'sparkles' | 'clock' | 'code' | 'palette' | 'lock' | 'chart' | 'users' | 'mail' | 'heart' | 'rocket' | 'search' | 'settings' | 'check' | 'star' | 'book' | 'box' | 'cloud' | 'compass' | 'leaf' | 'gauge') (optional). |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |