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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reacteditor/field-shopify

v0.0.2

Published

Select [products](https://shopify.dev/docs/api/storefront/latest/objects/Product) and [collections](https://shopify.dev/docs/api/storefront/latest/objects/Collection) from a [Shopify](https://www.shopify.com) store via the Storefront API.

Readme

field-shopify

Select products and collections from a Shopify store via the Storefront API.

Quick start

npm i @reacteditor/field-shopify @shopify/storefront-api-client
import {
  createFieldShopifyProduct,
  createFieldShopifyCollection,
} from "@reacteditor/field-shopify";

const config = {
  components: {
    ProductCard: {
      fields: {
        product: createFieldShopifyProduct({
          storeDomain: "my-shop.myshopify.com",
          // storefrontAccessToken is optional — tokenless storefront queries
          // are supported as of 2026.
        }),
      },
      render: ({ product }) => (
        <p>{product?.title ?? "No product selected"}</p>
      ),
    },
    CollectionGrid: {
      fields: {
        collection: createFieldShopifyCollection({
          storeDomain: "my-shop.myshopify.com",
        }),
      },
      render: ({ collection }) => (
        <p>{collection?.title ?? "No collection selected"}</p>
      ),
    },
  },
};

Options

Both createFieldShopifyProduct and createFieldShopifyCollection take the same options object.

| Param | Example | Type | Status | | ----------------------- | ------------------------ | ---------------------- | ----------------------------------- | | storeDomain | "my-shop.myshopify.com"| String | Required (unless using client) | | storefrontAccessToken | "abc123" | String | Optional (tokenless works in 2026+) | | apiVersion | "2026-01" | String | Optional | | client | createStorefrontApiClient() | StorefrontApiClient | Optional | | first | 20 | Number | Optional (default 20) | | titleField | "title" | String | Optional (default "title") | | filterFields | { vendor: { type: "text" } } | Object | Optional | | initialFilters | { vendor: "Acme" } | Object | Optional |

Tokenless queries

As of Shopify API version 2026, public storefront queries no longer require a storefrontAccessToken for unauthenticated shops. Omit the token and the client will issue unauthenticated requests against your storeDomain.

If your store still requires a token, supply storefrontAccessToken and it will be passed through to the client.

Reusing a client

import { createStorefrontApiClient } from "@shopify/storefront-api-client";
import { createFieldShopifyProduct } from "@reacteditor/field-shopify";

const client = createStorefrontApiClient({
  storeDomain: "my-shop.myshopify.com",
  apiVersion: "2026-01",
});

const productField = createFieldShopifyProduct({ client });

Filtering

filterFields values are forwarded to Shopify's Storefront search syntax as key:value clauses and combined with the search string using AND.

createFieldShopifyProduct({
  storeDomain: "my-shop.myshopify.com",
  filterFields: {
    vendor: { type: "text" },
    product_type: { type: "text" },
  },
  initialFilters: {
    vendor: "Acme",
  },
});

Returns

Both helpers return an External field that stores the selected product or collection object.

TypeScript

import {
  createFieldShopifyProduct,
  type ShopifyProduct,
} from "@reacteditor/field-shopify";

type MyProps = {
  ProductCard: {
    product: ShopifyProduct;
  };
};

License

MIT © The React Editor Contributors