# Cart Button

A mini cart with item rows, a rolling subtotal and a Checkout that stays disabled while empty.

Tier: Free

## Installation

```bash
npx shadcn add @fetaui/cart-button
```

## Usage

```tsx
import { CartButton } from '@/components/fetaui/cart-button'

export function Example() {
  return <CartButton items={items} onCheckout={checkout} />
}
```

## API

| Prop | Type | Default |
|---|---|---|
| items | CartItem[] | [] |
| onItemsChange | (items) => void |  |
| onCheckout | () => void |  |
| format | (amount) => string | USD |
| animated | boolean | true |

## When to use

- For a compact cart in a popover or side panel.

## When not to use

- For a full checkout page: compose your own layout.

## Accessibility

- A labelled section. The subtotal keeps its full text for screen readers.

## Motion

- Subtotal digits roll.
- Steppers follow Add to Cart Button.
- With reduced motion, the press scale is off and color changes stay.
