Metric Bars CTA
A two-column trust-building section: a heading, description, and call-to-action on one side, and a stack of labeled horizontal metric bars on the other, each bar's fill width set from a fixed numeric value.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/metric-bars-cta.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta32.tsx instead.
Usage
The file also exports cta32Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Cta32, cta32Demo } from "@/components/blocks/cta/cta32"; export default function Page() { return <Cta32 {...cta32Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | none | Small label above the heading. |
| heading | ReactNode | none | Main call-to-action heading. |
| description | string | none | Supporting copy under the heading. |
| metrics | MetricBar[] | none | Labeled bars, each with a fixed 0-100 fill value and a display string. |
| primaryCta | CtaLink | none | Primary action button, label and destination. |
| className | string | none | Extra classes for the outer section element. |
Types
interface MetricBar { label: string; display: string; value: number; // 0-100, bar fill percentage } interface CtaLink { label: string; href: string; }
Behavior notes
- Bars are static: each fill width is set once from the `value` prop via an inline `style={{ width }}`, clamped to 0-100, no animation or client-side state.
- `display` carries the human-readable text shown next to the label (e.g. "99.9%" or "Under 100ms") independently of the numeric `value` used for the bar width, so a bar can visually represent a metric that isn't itself a percentage.
More CTA Blocks
View all →centered-newsletter-cta
Centered Newsletter CTA
Minimal centered call-to-action with heading, description, and action buttons.
split-layout-newsletter-cta
Split Layout Newsletter CTA
Two-column call-to-action with a decorative image on one side and a feature list plus subscribe form on the other.
newsletter-social-proof-cta
Newsletter CTA with Social Proof
Newsletter call-to-action with an avatar stack, subscriber count, and a testimonial quote.
banner-cta
Banner CTA
Horizontal banner call-to-action with heading and action buttons side by side.
stats-cta
Stats CTA
Call-to-action section with impressive statistics and trust indicators above action buttons.
multi-card-cta
Multi-Card CTA
Three action cards side by side, each offering a different path to conversion.