wishlist-toggle
Adds or removes the product, or its current variant (data-use-variants), from the wishlist; inside a card of the wishlist page it works on the entry the card shows, product or variant.
At a glance
A product not saved
- Toggle
- No class.
- Rive
- On removal, plays the animation in
data-animation-off, oroff.
A product saved
- Toggle
- Gets
is-in-wishlist. Abuttoninside getsis-active, and screen readers hear it as pressed. - Rive
- Plays the animation in
data-animation-on, oron.
More in the guide.
Where it can go
- Inside any of:
smootify-product,smootify-variant[data-product-id="wishlist"]. - Out of place, Smootify removes it from the page.
What it requires
- The Wishlist extension (lite or server plan, or the extension activated in the Smootify dashboard). Without it, the element does nothing.
Attributes on the element
- It reads
data-use-variants,data-animation-on,data-animation-off.
Loading
Its code loads only on pages that have wishlist-toggle.