Skip to content

Projects & work

Projects Gallery

Every project as a grid of cards or a compact list, with a Grid / List switch.

Layout and motion from the Nitip template — see it in context

Installation

$ npx shadcn@latest add https://framebrick.co/r/blocks/projects-gallery.json

Usage

import { ProjectsGallery } from "@/components/projects-gallery";

<ProjectsGallery
  defaultView="grid"
  projects={[
    { title: "Harvest Kitchen", year: "2025", href: "/projects/harvest-kitchen", image: { src: "/work/harvest.jpg", alt: "…" } },
  ]}
/>

Props

PropTypeDefaultDescription
titlestring—Section heading for screen readers (visually hidden) — put hero-title above it.
projects{ title, year, href, image, services? }[]6 projectsShown in both views; titles are h3 links.
defaultView"grid" | "list""grid"View on first render.
labels{ grid, list, view, details }—Switch options, its accessible name, and the list's link text.
classNamestring—Classes for the <section>.
  • The switch's fill slides (segmented-control; arrow keys work); the new view fades in over 0.3s.
  • List rows: year and title (side by side from 768px), a 1.3625:1 photo capped at 100px (230px from 768px), and from 1024px a View details link.
  • Photos zoom to 105% while their card or row is hovered (zoom-card) — list rows at every width, not only from 1024px as on Framer.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this block in your own project.

Create a React + Tailwind CSS + Motion block called ProjectsGallery (Next.js).
- <section className="py-(--section-y)"> with a visually hidden h2; container mx-auto max-w-(--container) px-(--gutter), column gap-6.
- A Grid / List segmented control (radio group, sliding fill) aligned right. Switching fades the new view in (opacity 0 → 1, 0.3s ease-out),
  but not on first render.
- Grid: 1 column, 2 from 768px (gap-x-8 gap-y-12); cards as in ProjectsGrid (545:400 photo that zooms to 1.05 over 400ms
  cubic-bezier(0.12,0.23,0.5,1), a one-line muted meta row of service links and year, an h3 title link).
- List: rows with border-t (and a border-b under the last), py-5, items-start: year (text-sm muted) and title (h3) stacked, side by side
  from 768px; a 1.3625:1 photo (rounded-lg, max 100px, 230px from 768px) that zooms on hover; from 1024px a "View details" text link
  whose underline grows on hover.
- Only shadcn variables and block tokens; plain <img> with alt text.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy