Skip to main content
To start building with Swish, we recommend using the Swish SDK, Components and Intents.
Install Swish from the Shopify App Store
Before continuing with this quickstart, make sure Swish is installed in your Shopify store.
The Swish SDK delivers a consistent, high-performance experience across different JavaScript environments. Whether you’re building within a Shopify theme, using Hydrogen, or integrating custom storefronts, Swish makes it simple to add powerful shopping tools to your store.
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.
  1. Go to Online Store > Themes > Customize.
  2. Open App embeds (in the left sidebar).
  3. 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.
Render the save component anywhere on a product page. The snippet defaults to context="pdp" - the SDK reads the product from the current URL and reacts to SPA navigation.
For product cards in a collection grid, pass context: 'product-card' and the SDK walks to the nearest product link instead.
See the elements reference for the full attribute set.
4

Add a home button

Give customers a way to access their saved items, notifications, and other Swish features.
Render the drawer component in your header. The default view is home; pass view: to open saves, lists, orders, notifications, or profile instead.
See the elements reference for the full attribute set.
5

Customize (optional)

Two surfaces, two scopes: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
See the configuration reference for the full set of options.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).
If you cannot use the app embed, load the SDK manually in theme.liquid. You need to provide storefront credentials and customer context yourself.
theme.liquid
Replace 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.
Use the direct API only when your project cannot run the SDK (e.g. on backend servers or native apps).
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.
Whenever possible, we recommend using the Swish SDK, which handles authentication, performance optimizations, and UI integration automatically. The SDK abstracts much of the complexity involved in communicating with the API, ensuring a faster and more reliable development experience.