Setup
Target the product form or actions container and use an inline layout to place the button in the document flow.Styling
Pass design tokens underdesign to match the button to your product detail page style.
Button variants
Control the button appearance using element props:Overlay on product images
If you prefer the button to float over the product image instead of sitting inline, use an overlay or anchored layout and the On image look. A product page placement is On page by default - a heart with its label, styled like your theme’s buttons - so namestyle to get the icon-only chip:
Notify Me button
Thenotify-button element gives a shopper something to do on a sold-out variant. Point it at your theme’s buy-button row and mount it after: while the selected variant is out of stock the button appears and Swish hides the element you targeted; switching to an in-stock variant restores it untouched and the notify button disappears.
It also covers the case where nothing has been picked yet. On a product that is sold out in every variant the button appears before the shopper chooses anything, and the dialog it opens carries a variant picker so they can say which size they want to hear about. A product with any buyable variant left is untouched, so your add-to-cart is never hidden on something the shopper could still buy. On a combined listing that read is per child product — the one the shopper is on, which is the one your buy button is for.
What you point at is what gets hidden, so target the buy-button row itself. An
ancestor like
.product-form would take your variant picker with it, and the
shopper could not switch back to a variant they can buy. Keep mode: "after"
too: availability is per-variant, so "replace" would strip add-to-cart from
your in-stock variants and leave nothing to restore.swish.api.subscriptions.
The dialog asks for the size or colour with a dropdown, one per option. To match your product page instead, set Global → Preferences → Notify Me dialog → Variant picker to Pills or Rows, or ui.notifyMe.variantSelectDisplayType to "pills" or "rows".
Style it with the same props trio as the save button (variant, appearance, size) and these design tokens:
Further reading
- Placements overview for mount options, layout types, attributes, and responsive values
- Intents to configure save behavior
create:subscriptionto open the Notify Me dialog yourself- Product detail view for
notifyWhenSoldOut, the same button inside Swish’s own drawer - Placements reference for the full API