Responsive product grid with ratings, sale badges, and add to cart buttons. Perfect for shop pages and product catalogs.
Responsive product grid for shop and catalog pages: image tile with an optional sale/bestseller badge, star rating, current and struck-through original price, and a full-width "Add to Cart" button per card.
Free block
This block is free. No license or account is required: install it with the CLI and use it in unlimited projects.
Radix flavor
npx shadcn add "https://ui.beste.co/r/ecommerce1"Base UI flavor
npx shadcn add "https://ui.beste.co/r-base/ecommerce1"This installs the block to components/beste/block/ecommerce1.tsx and the Badge and Button shadcn/ui primitives it uses.
The installed file exports ecommerce1Demo alongside the block: the exact props behind the preview above. Spread it to get a working product grid in one line.
import { Ecommerce1, ecommerce1Demo } from "@/components/beste/block/ecommerce1";
export default function ShopPage() {
return <Ecommerce1 {...ecommerce1Demo} />;
}Then replace the demo with your own props. Written out, a trimmed setup looks like this:
import { Ecommerce1 } from "@/components/beste/block/ecommerce1";
export default function ShopPage() {
return (
<Ecommerce1
heading="Shop our latest collection"
currency="$"
products={[
{
name: "Minimal Desk Lamp",
price: 89,
originalPrice: 129,
image: "https://images.unsplash.com/photo-1731762524352-b5663f83a830?w=900&fit=crop",
badge: "Sale",
rating: 4.8,
reviewCount: 124,
},
{
name: "Ceramic Vase Set",
price: 65,
image: "https://images.unsplash.com/photo-1654856842864-145a630cd603?w=900&fit=crop",
rating: 4.9,
reviewCount: 89,
},
]}
onAddToCart={(product) => console.log("add to cart", product.name)}
/>
);
}| Prop | Type | Default | Description |
|---|---|---|---|
badge | { label: string; variant?: "default" | "secondary" | "outline" } | – | Optional pill badge above the heading |
heading | string | – | Section heading |
description | string | – | Section intro text |
products | Product[] | [] | Products rendered as cards |
currency | string | "$" | Symbol prefixed to every price and original price |
onAddToCart | (product: Product) => void | – | Called with the clicked card's product when "Add to Cart" is pressed |
className | string | – | Extra classes for the outer <section> |
type Product = {
name: string;
price: number;
originalPrice?: number;
image: string;
badge?: string;
rating?: number;
reviewCount?: number;
};lg:grid-cols-4, a count divisible by 3 (or greater than 4) gets lg:grid-cols-3, otherwise lg:grid-cols-2; sm:grid-cols-2 is always the mobile baseline.★ glyph in text-yellow-500 next to the numeric rating and review count, not the Star icon fill pattern used elsewhere in the Ecommerce category.originalPrice only draws a strikethrough price next to the current one; there's no automatic discount-percentage calculation or badge, the badge field (e.g. "Sale") is plain text supplied by the caller, not derived from the price difference.null outright when products is empty, rather than rendering the header with an empty grid.onAddToCart is the only interactive callback; there's no wishlist toggle, quantity selector, or cart state inside the block itself, it's presentation plus a single click handler per card.ecommerce4
Product category browsing with image cards, product counts, and featured badges. Responsive grid layout with hover effects. Perfect for storefront navigation and collection showcases.
ecommerce28
Product cards with hover wishlist buttons, quick add to cart overlay, and star ratings. Perfect for featured sections and bestsellers.
ecommerce14
Product recommendations grid with images, prices, and add to cart buttons. Perfect for cross-selling and upselling on product pages.
ecommerce35
Review cards with star ratings, product thumbnails, verified badges, and helpfulness counts. Perfect for social proof and testimonial sections.
ecommerce32
Brand logo cards with product counts and hover effects linking to brand pages. Perfect for multi-brand stores and brand discovery.
ecommerce33
Featured collection card with supporting collection tiles, image overlays, and product counts. Perfect for homepage collection highlights.