Install Swish from the Shopify App Store
Before continuing with this quickstart, make sure Swish is installed in your Shopify store.
Before continuing with this quickstart, make sure Swish is installed in your Shopify store.
- Liquid
- React
1
Enable the app embed
Open the Shopify theme editor and enable the Swish embed block. The embed loads the SDK automatically and handles storefront credentials, customer context, and localization for you - no code required.
- Go to Online Store > Themes > Customize.
- Open App embeds (in the left sidebar).
- Toggle Swish embed on and click Save.
2
Install the Swish snippet
Copy the
swish.liquid snippet into snippets/ and the matching swish-theme.css starter into assets/. Then render the snippet’s init block in theme.liquid before {{ content_for_header }} - it sets window.SwishOptions and loads the stylesheet so the embed picks them up.theme.liquid
3
Add a save button on a product detail page
Let customers save and unsave products from any product detail page.
- Snippet
- Placement
Render the save component anywhere on a product page. The snippet defaults to For product cards in a collection grid, pass See the elements reference for the full attribute set.
context="pdp" - the SDK reads the product from the current URL and reacts to SPA navigation.context: 'product-card' and the SDK walks to the nearest product link instead.4
Add a home button
Give customers a way to access their saved items, notifications, and other Swish features.
- Snippet
- Placement
Render the drawer component in your header. The default view is See the elements reference for the full attribute set.
home; pass view: to open saves, lists, orders, notifications, or profile instead.5
Customize (optional)
Two surfaces, two scopes:See the configuration reference for the full set of options.
SwishOptions configures the Swish app. This is everything the SDK runs - the drawer UI, design tokens, intent options, translations, and so on. Edit it inside the swish_init capture in snippets/swish.liquid:snippets/swish.liquid
assets/swish-theme.css styles the Liquid-rendered elements only. Paste merchant button styles into the empty rule bodies - they target <swish-save> and <swish-drawer> and their children. This stylesheet does not affect the SDK-injected drawer UI; that’s controlled by SwishOptions.ui.design (and ui.css if you need a full custom stylesheet for the app).Loading without the app embed
Loading without the app embed
If you cannot use the app embed, load the SDK manually in Replace
theme.liquid. You need to provide storefront credentials and customer context yourself.theme.liquid
YOUR_STOREFRONT_API_TOKEN with your Shopify Storefront API access token. See the configuration reference for instructions on obtaining one.Direct API access
Swish provides a Rest API for advanced use cases where direct server-side or third-party integration is required. This API is primarily intended for:- Third-party integrations - connecting Swish data to other systems or services.
- Server-side operations - running custom business logic or syncing data securely.
- Native mobile apps - integrating Swish features directly into iOS or Android applications.