Staaarter

Selected Work Bento

Work mosaic on a six-column track mixing photographic tiles that carry their caption inside on a gradient scrim with a soft statement tile and an inverted figure tile, the lead project spanning four columns and two rows.

By Staaarter Team
Bento
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/selected-work-bento.json

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

Usage

The file also exports bento3Demo, 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 { Bento3, bento3Demo } from "@/components/blocks/bento/bento3";

export default function Page() {
  return <Bento3 {...bento3Demo} />;
}

Props

PropTypeDefaultDescription
worksWorkItem[]noneProject list rendered as photographic tiles. The item flagged featured (or the first item if none is flagged) becomes the four-column, two-row lead tile; the rest render as two-column tiles.
statementStatementTilenoneSoft tile with a heading and short paragraph.
figureFigureTilenoneInverted (dark) tile with a big figure and a caption.
classNamestringnoneExtra classes for the outer section element.

Types

interface WorkItem {
  title: string;
  category: string;
  photo: { src: string; alt: string };
  featured?: boolean;
}

interface StatementTile {
  heading: ReactNode;
  body: string;
}

interface FigureTile {
  figure: string;
  caption: string;
}

Behavior notes

  • Purely presentational: no local state, no click-through to a real case study page.
  • The lead tile is picked with `works.find((w) => w.featured) ?? works[0]`, so exactly one work item is always promoted to the large tile even if none is explicitly flagged featured.
  • The grid is tuned for three work items (one lead plus two smaller); passing more than three will still render correctly but will overflow the neatly-packed six-column, three-row layout the demo shows.