Skip to main content

Wishlist Button

The heart. On a product or post template it saves that page; inside an Etch loop, each item. It is a real button that says whether it is saved with the heart and its pressed state —«Save Canvas Sneaker, toggle button, pressed»— rather than by changing its words.

A product card with its heart saved, top left

Either heart can be any SVG, the label can show always or float on hover, and a short animation plays when somebody presses it — never for anyone whose system asks for less motion.

Its options​

The Wishlist Button properties panel

Props

PropTypeDefaultWhat it does
LabeltextSaveShown beside the heart when the button has text, and always the start of its accessible name — «Save Canvas Sneaker». It stays the same when pressed: whether it is saved is said by the heart and by the pressed state, not by changing the words.
Displaychoice: icon, both, texticonIcon only is what a card wants; with the label, it reads better on a product page.
Label showschoice: always, hoveralwaysWith Icon and label. On hover, it floats beside the icon like a tooltip — also with the keyboard, and Escape hides it — and the button keeps the icon's size.
Label sidechoice: end, startend
Icons → Iconimagethe built-in icon
Icons → Saved iconimagethe built-in icon
Animateon / offonA short pop when saved and a small shrink when removed, only when somebody presses it. Never for anyone whose system asks for less motion.
Itemtext{this.id}What gets saved. On a product page or a post it is that page; inside an Etch loop whose item is called «this», it is each item. Bind it by hand only for a loop with another name.
Item typetext{this.type}Its post type, which is how a list can be counted by kind.
Item nametext{this.title}Read by screen readers after the label, so twenty hearts in a grid are twenty different buttons, not twenty «Save».
Colors → Hearttextvar(--fe-woo-color, #111827)
Colors → Savedtextvar(--fe-woo-accent, #111827)
Colors → Floating label backgroundtextvar(--fe-woo-surface, #ffffff)
Colors → Floating label texttextvar(--fe-woo-color, #111827)
Size → Heart sizetext1.25rem
Size → Button sizetextvar(--fe-woo-control-size, 2.75rem)

Variables of its own

VariableDefaultWhat it controls
--fe-fav-sizevar(--fe-woo-control-size, 2.75rem)How big the button is — the target a finger has to hit. Reads --fe-woo-control-size.
--fe-fav-icon-size1.25remThe heart. In the Count it reads --fe-woo-icon-size, shared with the cart and search icons.
--fe-fav-colorvar(--fe-woo-color, #111827)The heart, and its label, while nothing is saved.
--fe-fav-activevar(--fe-woo-accent, #111827)The heart once saved.
--fe-fav-gap0.5remThe space between the heart and its label, or its badge.
--fe-fav-focus-ringvar(--fe-woo-focus-ring, #2563eb)The ring the keyboard focus draws.
--fe-fav-tip-bgvar(--fe-woo-surface, #ffffff)The floating label's background.
--fe-fav-tip-colorvar(--fe-woo-color, #111827)The floating label's text.
--fe-fav-tip-bordervar(--fe-woo-border, #e5e7eb)The floating label's edge.