Ballmac UI home

Ecommerce 1: product listing with filters

A product grid that sells: price, sale and rating on each card, color choices, a bag button that says what it did, filters with counts and removable chips, sorting, and results counted aloud.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/ecommerce-1

Usage

Example: ecommerce-1-demo.tsx
"use client"

import { Ecommerce1 } from "@/components/ballmac/blocks/ecommerce-1/ecommerce-1"

export default function Ecommerce1Demo() {
  return <Ecommerce1 />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton filters and product grid under the real heading, announced as loading.

    state="loading"
  • Nothing here yet

    Says there is nothing here yet; emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying nothing was changed, with Try again (onRetry). Adding a product that fails says why on its card.

    state="error"

Dependencies

Use with AI

Product listing. <Ecommerce1 title description products={[{ id, name, price, compareAt?, rating, reviews, category, colors: [{ id, label, tone }], kind, badge? }]} currency onAddToCart={(id, colorId) => Promise} onToggleSaved={(id, saved) => Promise} />. Filters (category, price band, on sale) and sort work on the page; active filters show as removable chips and the result count is announced. On touch screens the bag button is always visible; with a mouse it appears on hover or focus. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Ecommerce 1: product listing with filters (@ballmac/ecommerce-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • A shop, a collection page or a marketplace category
  • Any catalog that needs filters and quick add

Not for

  • One product in detail; use ecommerce-2
  • Ranking data; use bar-list

Registry JSON: https://ui.ballmac.com/r/ecommerce-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.