Skip to content
caliper ui docs

Pro

Product listing

A filterable grid of products with sort and a result count.

Pro
pnpm dlx shadcn@latest add @caliper/product-listing

Harbour Goods, autumn edit

New season pieces for the October collection

6 of 6 products

  • Linen overshirt

    ★ 4.7 (212)

    $89
  • Canvas tote

    ★ 4.5 (98)

    $34
  • Merino beanie

    ★ 4.8 (311)

    Only 2 left

    $28
  • Leather weekender

    ★ 4.9 (57)

    $240Sold out
  • Ceramic mug set

    ★ 4.4 (140)

    $46
  • Wool throw

    ★ 4.6 (76)

    $120
Installs components/ui/product-listing.tsxDepends on @radix-ui/react-popover, @radix-ui/react-slot, lucide-reactMotion none in component source

When to use

Use it for

  • A shop page where people browse and narrow a catalogue.
  • Filters and sorting share the page.

Skip it when

  • You show a single product; use product detail.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/product-listing

Adds its 6 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { ProductListing } from "@/components/ui/product-listing"

The worked example comes with Pro

The 36-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

ProductListing

component
PropTypeDefault
products *readonly Product[]—
onAdd *(p: Product) => void—
onOpen((p: Product) => void)—
currencystring"USD"
classNamestring—

Accessibility

It exposes group and status semantics, with aria-label, aria-pressed and aria-hidden kept in step with state. Changes that matter are announced through a live region.

Keyboard and focus handling comes from Radix popover: arrow keys move through items, Enter and Space select, and Escape closes and returns focus.

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Commerce examples