# Filterable Coupons block

> Category-filterable coupon grid with one-click copy promo codes

Filterable promotions grid of discount cards showing min spend, expiry, status badge, and a copy-code button with copied feedback. ReUI Frame, Badge; shadcn Button. For sales, deals, loyalty, and discount pages.

- Type: Pro block
- Category: [Coupon](https://web.dev.reui.io/blocks/ecommerce/coupon.md)
- Page: https://web.dev.reui.io/blocks/ecommerce/coupon/coupon-2
- MCP: `get_block("coupon-2")`
- Built with: Badge, Button, Frame
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A filterable grid of 6 offers with category pills, a live result count and a copy button in each Frame footer

## Agent notes

- `COUPONS` holds the 6 sample offers, and every `id` must also be added to the closed `CouponId` union type
- `FILTER_CATEGORIES` is a hand written list of 7 pills; a new `category` value needs its own entry there
- Filtering is a client side `useMemo` over `COUPONS`; there is no search, sorting or paging

## When not to use

- One featured sale with a single code, a photo and fine print: use [Promo Code Hero](https://web.dev.reui.io/blocks/ecommerce/coupon/coupon-1.md) (`get_block("coupon-1")`)
- Product collections to browse in a carousel rather than codes to copy: use [Category Carousel](https://web.dev.reui.io/blocks/ecommerce/category-card/category-card-3.md) (`get_block("category-card-3")`)

## Install

```bash
npx shadcn@latest add @reui/coupon-2
```

## About Coupon blocks

### When to use

- A single sale or member offer: headline, a promo code to copy, expiry, fine print and a shop button
- A promotions page listing several codes, filtered by offer type, each with its own copy button
- A dismissible full width strip that announces one sale or shipping perk and its code

### When not to use

- A source snippet or terminal command shown with its own copy button: use [Code Block](https://web.dev.reui.io/components/code-block.md) (`get_component("code-block")`)
- A closing signup or launch band that sells a product with no discount to redeem: use the [CTA blocks](https://web.dev.reui.io/blocks/marketing/cta.md)
- A field where the shopper types a code and watches the order total drop: use the [Shopping Cart blocks](https://web.dev.reui.io/blocks/ecommerce/shopping-cart.md)

### Agent notes

- `handleCopy` flips to Copied even when `navigator.clipboard` is missing or the write rejects; add a fallback before you rely on it
- Every page.tsx wraps the offer in a `min-h-svh` main; drop that wrapper when the offer sits inside an existing page
- The `code` value is a plain string copied as is; nothing validates it, applies it to an order or records a redemption

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.
