# Free Shipping Bar block

> Full-width promo announcement bar with copyable discount code

Dismissible top banner announcing an offer with a dashed promo code chip, copy-to-clipboard button with copied feedback, and a restore action. Uses shadcn Button. For sale bars, free-shipping notices, discount codes, store promotions.

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

## Best for

A muted strip with a border above and below for a standing shipping perk, a truck icon and an outline copy button

## Agent notes

- `PROMO` carries only `headline` and `code`; the truck icon is hard coded in the JSX, so change it with the offer
- Closing sets `dismissed` in plain `useState`, so the bar returns on every reload; persist it if it must stay closed
- While `dismissed` the component returns a Promo bar dismissed message with a Show again button; drop that branch in production

## When not to use

- A strip that must read dark and inverted against a light page: use [Flash Sale Bar](https://web.dev.reui.io/blocks/ecommerce/coupon/coupon-6.md) (`get_block("coupon-6")`)
- A lone copy action with no strip or offer wording around it: use [Button](https://web.dev.reui.io/components/button.md) (`get_component("button")`)

## Install

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

## 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.
