Staaarter

Two Image Layout

A centered heading and description sit above two side-by-side images, whose relative width is controlled by a ratio prop (equal, left-larger, or right-larger). A minimal layout block for photo-led about sections.

By Staaarter Team
About
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/two-image-layout.json

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

Usage

The file also exports about32Demo, 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 { About32, about32Demo } from "@/components/blocks/about/about32";

export default function Page() {
  return <About32 {...about32Demo} />;
}

Props

PropTypeDefaultDescription
headingstringnoneCentered section heading.
descriptionstringundefinedCentered intro paragraph below the heading.
imageOneMediaSlotImageundefinedLeft-hand image.
imageTwoMediaSlotImageundefinedRight-hand image.
ratio"equal" | "left-larger" | "right-larger""equal"Controls each image's column span out of a 6-column grid: 3/3, 4/2, or 2/4.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • Unlike About5's single image-and-text split, About32 has no stats, buttons, or story column at all; it is purely a header plus a two-image row, meant to be paired with other blocks rather than carry its own CTA.
  • ratio only changes each image's grid-column span, not its aspect ratio; both images keep the same aspect-4/3 box, so 'larger' means wider, not taller.
  • When ratio is 'equal' the two images match About1's 2-column team grid proportions, but About32 has no avatars, initials fallback, or member names, only MediaSlot images.