Skip to Content

Discover Gallery

Discover gallery with filters: a collapsible facet sidebar or mobile sheet, search with a slash shortcut, two or three masonry columns and pagination. Takes an array of items for a catalog or inspiration showcase.

Installation

pnpm dlx shadcn@latest add @01orbital/discover-gallery

Usage

import { DiscoverGallery } from "@/components/discover-gallery/discover-gallery"

Needs props to render

Pass items; see the API reference below.

API reference

A searchable, filterable gallery of cards. From the md breakpoint a sidebar on the left lists the categories and tags as toggle chips with counts, and can be collapsed; on smaller screens a Filters button opens the same filters in a sheet. The top bar holds a search field and a two or three column switch. Cards stack in masonry columns, each with a cover, its name as a link and its category. Page links and a page-size menu sit below.

Search, filters and paging run in the browser over items. Pressing / outside a text field moves focus to the search field. The visible words live in COPY at the top of the file.

Prop

Type

Dependencies

npm: @phosphor-icons/react, cn. The CLI installs them for you.

Requires these pieces. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.

Used in blocks

One block is built with Discover Gallery.

Last updated on