

Every state


default


hover


focus


saved


just-saved


failed


no-count


compact-count
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| productName | string | "Speckled mug" | Named in the button's accessible name. |
| saved | boolean | false | Start saved. |
| count | number | null | 1284 | How many people saved it. Null hides the count. |
| saveLabel | string | "Save" | Text while not saved. |
| savedLabel | string | "Saved" | Text while saved. |
| wishlistHref | string | null | "/wishlist" | Linked in the line after saving. Null: no line. |
| locale | string | "en-IE" | Formats the count; 10,000 and up are compact. |
| onToggle | (saved: boolean) => Promise<void> | void | – | Called with the new value; reject to put the heart back. |
| className | string | – | Extra classes on the wrapper. |
More commerce parts
All 19commerce-18 is in UI ProGet UI Pro, €199


