Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Tab Categories Gallery Block for React

A band of four tabs where each panel is a collection's own page: a large cover, its name, two lines about it, its picture count and four more pictures.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A gallery of curated collections for React with Base UI, for Tablemark, a studio that brands restaurants. A start-aligned header sits over a band of four tabs ruled with + marks: Menus, Signage, Tableware and Booking. Each tab's panel is a page of its own, laid out differently on purpose: a large cover picture, the collection's name with "14 pictures", two lines about it, an outline button and a row of four more pictures that link on. Menus puts the cover at the start, Signage across the top, Tableware at the end and Booking a tall cover at the start. The pages differ in height, so an unseen copy of every page holds the block's height. On a phone the cover comes first and the four pictures are a snap row. The pictures are drawn, not photographed, in your theme's own greys. It's built from Tabs, Badge, Button and Guides. The studio and its work are made up for the example.

FAQ

How are the four pages laid out differently?

Each collection carries its layout as data: literal classes for where the cover, the copy and the row of four sit from the large breakpoint, so one Panel draws all four. Cover at the start, across the top, at the end, and a tall one at the start. The reading order never changes: the cover is first in the markup, then the copy, then the row.

Where does

A collection lists the pictures shown on its page (a cover and four more) and a count of the others in the library, elsewhere. The badge adds them up, and the status line says it too after each tab. The other nine are example data: this block doesn't draw them, and the "Open the collection" button and the pictures are links (href="#") for you to point at your pages.

Why doesn't the page jump when I change tab?

An unseen copy of all four pages (hidden from assistive technology and from the keyboard) sits in the same cell as the open page, so the block is always as tall as the tallest page and the tabs never move. Each page stretches to fill that height.

How does it work with a keyboard?

The tabs follow the usual pattern: Tab reaches the chosen tab, the arrow keys move between tabs (mirrored in a right-to-left layout), Home and End jump to the ends, and Tab again enters the page, where the button and the four pictures are links in reading order.

How does it fit on a phone?

The tab band scrolls sideways if it has to. In a page, the cover comes first, then the name, the copy and the button, and the four more pictures become a snap row you swipe, with the next picture peeking.

How do I use my own photographs?

Each picture is typed data with a description (its alt text), a scene and a ratio. Add your image's address to it, then replace the Scene in its tile with <img alt="" className="size-full object-cover" src={…} />: the caption already names the picture, and the role="img" wrapper's label can move to the alt. The comment above Scene says where. Tiles crop to a fixed shape, so keep object-cover.

  • Pro

    Categorized Tabs Gallery

    Filter, sort and tabs

    A vertical list of five collections, each with its count, beside a grid of that collection's pictures on shared hairlines, with the list carrying the divider.

  • Pro

    Filterable Gallery

    Filter, sort and tabs

    Twelve drawn pictures on shared hairlines with a band of chips, each with a count, that keeps only one kind of work and says how many are showing.

  • Pro

    Featured Hero Gallery

    Masonry and mosaic

    A boat-charter gallery on one hairline grid: a featured picture two cells wide and tall beside four small ones, and choosing a small picture swaps it with the featured one in place.

  • Pro

    Discipline Tabs Craft About

    Principles and process

    Tabs for four disciplines of a design-to-code tool: each panel lists three principles with a before and after sample and the figure that changed.

  • Pro

    Four pill tabs (All, Growers, Co-ops, Advisers) over a wall of eight customer wordmarks in shared hairline cells, for a farm planning tool.

  • Pro

    A film-criticism reading list with three underline tabs, Latest, Popular and Editor's picks, each drawing a different row: dated rows, ranked rows with read counts, and rows with an editor's note.