Staaarter

Feature with Stats Grid and Image

A two-column feature section pairing a heading, description, and a 2x2 grid of icon stat cards on one side with a square image on the other. The image side can be flipped with an imagePosition prop, good for a metrics-forward product or company page.

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 badge, button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/feature-stats-grid-image.json

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

Usage

The file also exports feature64Demo, 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 { Feature64, feature64Demo } from "@/components/blocks/feature/feature64";

export default function Page() {
  return <Feature64 {...feature64Demo} />;
}

Props

PropTypeDefaultDescription
badgestringundefinedSmall label above the heading.
headingReactNodenoneSection heading.
descriptionstringundefinedSupporting paragraph under the heading.
statsFeature64Stat[]noneFour icon stat cards shown in a 2x2 grid.
ctaFeature64CtaundefinedOptional link button under the stats grid.
imageMediaSlotImagenoneSquare image on the opposite side from the text/stats.
imagePosition"left" | "right""right"Which side the image sits on.
classNamestringnoneExtra classes for the outer section element.

Types

interface Feature64Stat {
  icon: LucideIcon;
  value: string;
  label: string;
}

interface Feature64Cta {
  label: string;
  href: string;
}

Behavior notes

  • Fully static Server Component: no event handlers, no client state.
  • imagePosition flips the grid column order via a CSS order utility rather than reordering markup.
  • The CTA renders as a real Next.js Link via the button's render prop, but has no destination behavior beyond navigating to whatever href you supply.