This tutorial shows how to place a Wishlist Power heart button over the product image in the Focal Shopify theme. Start with Add a custom wishlist button if you have not used the web component before.
The code excerpts include surrounding theme code and ... placeholders. Insert the wishlist code at the indicated position; do not paste the surrounding example as a complete file.
Preview
Here’s what it will look like once implemented:

The heart icon appears in the top-right corner of the product image, toggling between “add” and “remove” states.
Step 1 — Open snippets/product-media.liquid file
- From your Shopify admin, go to Online Store → Themes → Edit code.
- In the code editor, open the file
snippets/product-media.liquid
Step 2 — Insert the Wishlist Button
Inside the element, paste the following code right at the end of the div that has the product__media-list-wrapper class:
<div class="product__media-list-wrapper" style="max-width: {{ max_width }}px">
...
{%- if section.settings.enable_image_zoom -%}
<button {% if selected_media.media_type != 'image' %}hidden{% endif %} is="toggle-button" aria-controls="product-{{ section.id }}-{{ product.id }}-zoom" aria-expanded="false" class="tap-area product__zoom-button">
<span class="visually-hidden">{{ 'product.general.zoom' | t }}</span>
{%- render 'icon' with 'image-zoom' -%}
</button>
{%- endif -%}
<!-- INSERT CODE HERE -->
<ooo-wl-wishlist-button product-id="{{ product.id }}" handle="{{ product.handle }}" loading>
<button type="button">
{%- render 'icon' with 'heart', class: 'header__nav-icon' -%}
</button>
<p>You already have variants in your wishlist.</p>
</ooo-wl-wishlist-button>
<style>
ooo-wl-wishlist-button {
z-index: 1;
position: absolute;
top: 10px;
right: 20px;
button {
display: grid;
width: 50px;
height: 50px;
align-items: center;
justify-content: center;
}
}
/* Show only the Add or Remove button based on state */
button[aria-checked="true"] svg {
fill: black;
}
button[aria-checked="false"] svg {
fill: none;
}
/* Hide the variant message by default */
ooo-wl-wishlist-button p {
display: none;
}
/* Show the message if a variant warning is required */
[show-variant-warning="true"] p {
display: block;
}
/* Loading state */
ooo-wl-wishlist-button[loading] {
display: grid;
border-radius: 2px;
background: #ebebeb;
cursor: not-allowed;
animation: loadingPlaceholder 4s ease infinite;
animation-delay: -.170s;
svg {
display: none;
}
}
@keyframes loadingPlaceholder {
50% {
opacity: 1
}
75% {
opacity: .5
}
to {
opacity: 1
}
}
/* Animation when product is added to wishlist */
ooo-wl-wishlist-button button[aria-busy="true"][aria-checked="true"] svg {
animation: pulse 0.3s cubic-bezier(.13, -0.3, .2, 1.91);
}
@keyframes pulse {
0% {
transform: scale(0.9);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}
</style>
<!-- INSERT CODE HERE -->
</div>
...
Note: You can adjust the top and right CSS values to position the icon exactly where you want.
Step 3 — Add the heart icon in the icon files
- In the code editor, open the file
snippets/icon.liquid -
Add this code below the
{%- case icon -%}tag:{%- case icon -%}
{%- comment -%} UI {%- endcomment -%}
{%- when ‘heart’ -%}
…
This will ensure the heart icon is available in your icon list.
Step 4 — Save and Preview
Once you save the file and reload your product page, you should see the heart icon overlaid on the product image.
Clicking the heart will add or remove the product from the wishlist. When active, the icon is filled; when inactive, it’s outlined.
Check your integration
That’s it! 🎉 You’ve successfully added a wishlist heart icon inside the product image on the Focal theme.
This integration provides a sleek, customizable button that seamlessly integrates into your product gallery. If you’d like to explore more advanced customization with the Wishlist web component, check out the full documentation here: 👉 Wishlist Button Web Component Documentation