Call to action, scattered pictures


Install
npx shadcn add @klarhimmel/cta-scatteredDetailsAbout, usage, props and more
A centred call to action (label, heading, lead and two actions) with small pictures scattered around all four sides of the section: four on a phone, eight on a wide…
Import
Import
- cta/scattered
- About
- A centred call to action (label, heading, lead and two actions) with small pictures scattered around all four sides of the section: four on a phone, eight on a wide screen.
- 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
Pick it for a playful closing call to action, centred, with small pictures scattered around every side of the band. For a plain centred band use cta-band; for one large picture beside the text use cta-split.
Writing for it
- The title holds 120 characters, the lead 240 and the label 60. Say what the visitor does next. - Four to eight pictures: the first four sit at the top, bottom, left and right edges, the next four in the corners and show from a tablet width up. - Each picture needs alt text of up to 200 characters; keep each one small and square.
Watch out for
The pictures sit behind the text, so a long lead on a phone can run over the edge pictures. Keep the lead to one sentence and use square pictures with a clear subject.
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 | 'Section name' | Text, up to 60 characters. |
title | string | 'Say what the visitor should do next' | Text, up to 120 characters. |
description | string | 'Say in one sentence what the visito…' | Text, up to 240 characters. |
primary | Link | {…} | See the type. |
secondary | Link | {…} | Optional; empty is not rendered. |
pictures | { media }[] | 8 items | List of 4 to 8. Each item: media. |
headingLevel | '1' | '2' | - | One of '1', '2'. Optional; empty is not rendered. |