

Every state


default


hover


focus


adding


added


sale


sold-out


long-name
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| name | string | "Speckled jug" | Product name. |
| variant | string | null | "Speckled oat · 1 litre" | The chosen variant on one line. Null hides it. |
| image | { src; alt; width; height; fit? } | – | Small photo; fit "cover" or "contain". |
| price | number | 3800 | In minor units. |
| compareAtPrice | number | null | null | The price before a sale. Null: no sale. |
| soldOut | boolean | false | A disabled button that says it can't be bought. |
| added | boolean | false | Start in the added state (for previews). |
| pending | boolean | false | Start in the adding state (for previews). |
| addLabel | string | "Add to cart" | Button text. |
| soldOutLabel | string | "Sold out" | Button text when sold out. |
| cartHref | string | null | "/cart" | Once added the button becomes this link. Null: it just says Added. |
| onAdd | () => Promise<void> | void | – | Called on add; the button waits for it. |
| currency | string | "EUR" | ISO 4217 code. |
| locale | string | "en-IE" | Formats the price. |
| className | string | – | Sticks to the bottom by default (sticky bottom-0); pass fixed inset-x-0 bottom-0 or top-0 to change where. |
More commerce parts
All 19commerce-15 is in UI ProGet UI Pro, €199


