# Add-to-Cart Grid block

> Frameless ecommerce product grid with per-card Add to Cart and hover wishlist toggle

Frameless ecommerce product grid for shop and category pages: image tiles with full-width Add to Cart, hover-reveal wishlist toggle, category links, sale badges, star rating, and strikethrough price. Uses ReUI Badge, Rating, shadcn Item, Button.

- Type: Pro block
- Category: [Product Grid](https://web.dev.reui.io/blocks/ecommerce/product-grid.md)
- Page: https://web.dev.reui.io/blocks/ecommerce/product-grid/product-grid-3
- MCP: `get_block("product-grid-3")`
- Built with: Badge, Button, Item, Rating
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

Borderless tiles in 3 columns with star ratings, a linked review count and a full width Add to Cart button

## Agent notes

- `handleAddToCart` only dispatches a `CustomEvent` named reui:add-to-cart on window and sets no state, so the button shows no added feedback
- Each product needs `rating` and `reviewCount`; the count links to `href` plus #reviews, so your product page needs that anchor
- A product holds 1 or 2 `categories` links; a second one adds a dot separator in the eyebrow row

## When not to use

- A listing with a sort menu, filter popover and breadcrumb header above the tiles: use [Rated Product Grid](https://web.dev.reui.io/blocks/ecommerce/product-card/product-card-8.md) (`get_block("product-card-8")`)

## Install

```bash
npx shadcn@latest add @reui/product-grid-3
```

## About Product Grid blocks

### When to use

- A collection or category page body of photo tiles with prices, sale strikethroughs and a wishlist save
- Comparing colorways through swatches, or buying from the listing with a hover size picker or cart button
- Editorial or lookbook edits whose tiles add a story and specs, or fade to an on model photo on hover

### When not to use

- Dashboard tiles for KPIs, people or records in an app, with no price or buy control: use the [Card blocks](https://web.dev.reui.io/blocks/application/card.md)
- A bordered panel surface with header, body and footer slots for content not for sale: use [Frame](https://web.dev.reui.io/components/frame.md) (`get_component("frame")`)
- A listing with its own heading, sort and filter toolbar, breadcrumb or carousel rail: use the [Product Card blocks](https://web.dev.reui.io/blocks/ecommerce/product-card.md)

### Agent notes

- `ProductGrid` takes no props and maps `PRODUCTS` from data.ts, where each `price` is a preformatted string and every `href` is a hash placeholder
- The wishlist toggle only flips the local `likedProducts` set seeded from `DEFAULT_LIKED_PRODUCT_IDS`; persist it to your own wishlist store
- Each page.tsx adds a `min-h-svh` main and `ProductGrid` sets `max-w-6xl` with its own padding; drop both inside your storefront layout

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
