npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@shopify/app-bridge

v3.7.11

Published

> **Maintenance Mode:** Although apps using this package will continue to function, it is no longer receiving updates. For new projects, please use the [CDN version of App Bridge](https://shopify.dev/docs/api/app-home?accordionItem=getting-started-build-y

Readme

Maintenance Mode: Although apps using this package will continue to function, it is no longer receiving updates. For new projects, please use the CDN version of App Bridge. Existing apps can follow our migration guide.

@shopify/app-bridge

Join our team and work on libraries like this one.

License: MIT npm version npm bundle size (minified + gzip)

You can use Shopify App Bridge to embed apps and channels directly into the Shopify admin, Shopify Mobile, and Shopify POS. Shopify App Bridge helps to reduce your development time by accessing native Shopify features across different platforms, and makes sure that the user experience is consistent wherever merchants are using your app.

Shopify App Bridge is a replacement for the now deprecated Embedded App SDK.

Installation

You can install Shopify App Bridge by using Yarn:

yarn add @shopify/app-bridge

Usage

Set up your app

In the following example, you need to store host during the authentication process and then retrieve it for the code to work properly. To learn more about this process, see Getting and storing the shop origin.

Import the library from the @shopify/app-bridge package and provide a configuration:

import createApp from '@shopify/app-bridge';

const app = createApp({
  apiKey: 'API key from Shopify Partner Dashboard',
  host: 'host from URL search parameter',
});

Actions

Shopify App Bridge introduces the concept of actions. An action provides a way for applications and hosts to trigger events with a statically-typed payload.

To learn more about the supported actions, see the actions documentation.

App State

Once the app is set up, you can access additional details and the state of the app at any time by making async call app.getState():

app.getState().then((state: any) => {
  console.info('App State: %o', state);
});

You can also use a shorthand to retrieve nested properties by passing in a query when calling getState(query), for example:

app.getState('pos.user').then((user: any) => {
  console.log('POS User: %o', user);
});

Hooks

Shopify App Bridge can be extended with hooks, which run when actions are dispatched and updated. Hooks are middleware that can modify or cancel actions.

Development & Debugging

Shopify App Bridge is shipped with a development build, which provides detailed debugging information during development.

If you're consuming App Bridge from a CDN or using the UMD build, simply include the development version: umd/index.development.js instead of umd/index.js

When consumed as JS Modules, development/production build is dynamically selected based on the NODE_ENV variable. Development build is used when NODE_ENV=development.

Please note that the development build is not intended for production use, as the file size is significantly larger.