Product Grid
A responsive list grid for product cards: two columns on phones, three on tablets, three to five on desktop, with an empty state.
npx shadcn@latest add https://ui.develop-better-solutions.com/r/product-grid.jsonWalnut side table
1,290 MAD
Linen throw
420 MAD
Ceramic vase
290 MAD
Oak shelf
980 MAD
Wool rug
1,850 MAD
Brass lamp
760 MAD
Usage
product-grid-example.tsx
import { ProductGrid, StoreProductCard } from "@dbs/ui";
const ITEMS = [
["Walnut side table", "1,290 MAD", "steps-boxes"],
["Linen throw", "420 MAD", "approach-glass"],
["Ceramic vase", "290 MAD", "approach-glass"],
["Oak shelf", "980 MAD", "steps-boxes"],
["Wool rug", "1,850 MAD", "approach-glass"],
["Brass lamp", "760 MAD", "approach-glass"],
] as const;
export default function ProductGridExample() {
return (
<div className="w-full max-w-5xl">
<ProductGrid columns={3}>
{ITEMS.map(([name, price, img]) => (
<StoreProductCard key={name} name={name} price={price} image={`/samples/${img}.jpg`} rating={4.5} />
))}
</ProductGrid>
</div>
);
}