Back to components
ComponentGalleryFree

Expand Card Grid React component

A 2x2 grid of image cards that expand to fill the frame on click, revealing title/description/CTA, with keyboard arrow navigation between cards and swipe-to-close on touch.

About the Expand Card Grid component

Expand Card Grid is a free 2×2 grid of image cards where clicking one expands it to fill the whole frame and reveals its title, description and a call-to-action button. Arrow keys move between cards, Enter or Space opens one, Escape closes it, and on touch screens a swipe closes it.

Transition length, gap, corner radii, colors, title and description sizes, the button and an optional index number are props.

When to use it

Use it for four services, products, programmes or destinations, where each needs a picture and a short pitch but the page shouldn't be long.

Installation

Add the Expand Card Grid component to your project with the shadcn CLI. It lands in components/expand-card-grid.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/expand-card-grid

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install clsx tailwind-merge

More Gallery components

Story Slider
Linen Drag Image
Scroll Title Gallery
Diamond Scroll Gallery
Cards Gallery Ring
Dot Image Slider
Free