Skip to main content

shopify-attr

Use the shopify-attr attribute to bind an attribute to data from Shopify. Anywhere within the template of a shopify-context component, you can use the shopify-attr--attribute-name attribute to bind an attribute to data from Shopify. For example, shopify-attr--href="product.onlineStoreUrl" can be used to bind the href attribute to the onlineStoreUrl field on a product context.

See the playground for more complete examples.


Was this page helpful?