caliper uidocs

Product listing

Pro

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

Installs components/ui/product-listing.tsxDepends on @radix-ui/react-popover, @radix-ui/react-slot, lucide-reactMotion none in component source
pnpm dlx shadcn@latest add @caliper/product-listing

6 of 6 products

  • Linen overshirt

    ★ 4.7 (212)

    $89
  • Canvas tote

    ★ 4.5 (98)

    $34
  • Merino beanie

    ★ 4.8 (311)

    $28

    Only 2 left

  • Leather weekender

    ★ 4.9 (57)

    $240Sold out
  • Ceramic mug set

    ★ 4.4 (140)

    $46
  • Wool throw

    ★ 4.6 (76)

    $120

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 24-line example behind the preview opens here with a Pro or Team licence.

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.