Call to action, split


Install
npx shadcn add @klarhimmel/cta-splitDetailsAbout, usage, props and more
A panel with a headline, one or two actions and an image beside the copy.
Import
Import
- cta/split
- 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 bordered panel with copy and buttons on one half and an image on the other, to close a page with a picture. For a full-width photo with an overlay, use cta-media; for no image at all, cta-band.
Writing for it
- Title holds 120 and description 240, but the text half is only half the width, so keep the title to one or two lines. - The secondary button is drawn in the quieter secondary style. Use it for a lower-commitment step such as 'See examples'. - The image fills the full height of its half at 4 to 3 on narrow screens, so pick a subject that survives cropping to a tall frame.
Watch out for
On narrow containers the image moves above the text, which changes the reading order from what you see on a wide preview. All text fields are optional, so check that a cleared title does not leave an image with two unlabelled buttons.
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 |
|---|---|---|---|
title | string | 'Say what the visitor can do next' | Text, up to 120 characters. |
description | string | 'Say in a sentence or two what the f…' | Text, up to 900 characters. |
primary | Link | {…} | Optional; empty is not rendered. |
secondary | Link | {…} | Optional; empty is not rendered. |
media | Media | {…} | See the type. |
frame | 'panel' | 'open' | - | One of 'panel', 'open'. Optional; empty is not rendered. |
actionsBelow | boolean | - | Optional; empty is not rendered. |
tertiary | Link | - | Optional; empty is not rendered. |
titleSize | 'title' | 'heading' | - | One of 'title', 'heading'. Optional; empty is not rendered. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |