The promise and two actions on a soft glow, with what's included and the people already using it.
$ pnpm dlx shadcn@latest add @dashral/cta-centeredWhen to use
- The promise and two actions on a soft glow, with what's included and the people already using it.
- The last section of a landing page.
When not to use
- Between sections, where a whole section would interrupt the page: CTA banner.
- Sign-ups that start with an email: CTA with sign-up.
Usage
CTA centered with your own data: every prop has the sample as its default, so pass only what you have.
example.tsx
import { CtaCentered } from "@/components/dashral/blocks/cta-centered"
<CtaCentered
title="Start building today"
primary={{ label: "Start free", href: "/register" }}
promises={["14-day trial", "No card needed", "Cancel anytime"]}
people={avatars}
/>API reference
CtaCentered
A call to action between sections of a landing page: the promise and two actions on a soft glow, with the people already using it under them. Every part comes from props.
| Prop | Type | Default |
|---|---|---|
badge | React.ReactNodeThe pill above the heading; none hides it. | sample |
title | React.ReactNode | sample |
description | React.ReactNode | sample |
primary | BlockAction | sample |
secondary | BlockAction | nullThe second button; null hides it. | sample |
promises | string[]Short promises under the buttons; none hides the row. | sample |
people | { name: string; src?: string }[]The people already using it, and their rating; no people hides the row. | sample |
rating | React.ReactNode | sample |
type BlockAction
A button: a link with href, or your handler with onClick.
| Prop | Type | Default |
|---|---|---|
label | string | — |
href | string | — |
onClick | () => void | — |