

Every state


default


hover


focus


adding


in-cart


focus-stepper


single


at-max


sold-out
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| productName | string | "Speckled mug" | Named in the screen-reader labels. |
| quantity | number | 0 | Units already in the cart; 0 shows the add button. |
| max | number | 6 | The most one order can take; plus stops there. |
| soldOut | boolean | false | A disabled button that says the product can't be bought. |
| 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" | Link to the cart beside the count. Null hides it. |
| onChange | (quantity: number) => Promise<void> | void | – | Called with the new quantity (0 = removed); the control waits for it, and a reject keeps the old quantity. |
| className | string | – | Extra classes on the wrapper. |
More commerce parts
All 19commerce-01 is in UI ProGet UI Pro, €199


