Staaarter

Alternating Proof Rows

Feature rows that alternate the image side on every second entry, each pairing an eyebrow, display title, and explanation with one oversized outcome figure on its own rule, headed by an outline pill CTA pinned to the top right.

By Staaarter Team
Feature
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/alternating-proof-rows.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/feature/feature21.tsx instead.

Usage

The file also exports feature21Demo, 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 { Feature21, feature21Demo } from "@/components/blocks/feature/feature21";

export default function Page() {
  return <Feature21 {...feature21Demo} />;
}

Props

PropTypeDefaultDescription
headingstringundefinedSection heading, paired with the CTA in the top row.
cta{ label: string; href: string }undefinedOutline pill CTA pinned to the top right of the heading row.
rowsProofRow[]noneAlternating image/text rows.
classNamestringnoneExtra classes for the outer section element.

Types

type ProofRow = {
  eyebrow: string;
  title: string;
  description: string;
  outcomeFigure: string;
  outcomeLabel: string;
  photo: { src: string; alt: string };
};

Behavior notes

  • Purely presentational: no client-side state. The CTA is a decorative link (href "#" in the demo).
  • Every odd-indexed row (0-based) swaps the image to the right via `lg:order-2`/`lg:order-1`; on mobile the image always stacks above the text regardless of index, so the alternation is desktop-only.
  • The outcome figure sits on its own top rule below the description in every row, independent of the image side.