--- url: /reference/items/FetchShopifyPartial/examples.md --- # Examples ::: tip These examples run against a Shopify storefront using the [Liquid July '26 partial rendering preview](https://shopify.dev/docs/storefronts/themes/getting-started/developer-preview/partial), so they are shown as code rather than live playgrounds. See the [`Fetch` examples](../Fetch/examples.md) for runnable demonstrations of the inherited behaviour. ::: ## Sorting a collection Refresh the product grid and the results count when the customer picks a sort order, keeping their scroll position. ::: code-group ```liquid [collection.liquid] {% partial 'product-grid' %} {% endpartial %} {% partial 'product-count' %}

{{ collection.products_count }} products

{% endpartial %} Sort by price ``` ```ts [app.ts] import { registerComponent } from '@studiometa/js-toolkit'; import { FetchShopifyPartial } from '@studiometa/ui'; registerComponent(FetchShopifyPartial); ``` ::: ## Faceted filtering with a form Use a `
` so the selected facets are appended to the URL automatically, and display a loader while the partials are refreshed with the inherited [`Action`](../Action/index.md) and [`Transition`](../Transition/index.md) components. ::: code-group ```liquid [collection.liquid] {% for filter in collection.filters %} {% render 'facet', filter: filter %} {% endfor %}
Loading…
{% partial 'active-filters' %}
{% render 'active-filters' %}
{% endpartial %} {% partial 'product-grid' %} {% endpartial %} ``` ```ts [app.ts] import { registerComponent } from '@studiometa/js-toolkit'; import { Action, FetchShopifyPartial, Transition } from '@studiometa/ui'; registerComponent(Action); registerComponent(FetchShopifyPartial); registerComponent(Transition); ``` ::: ::: tip Changing a facet fires a native `change` event that bubbles to the form, where the [`Action`](../Action/index.md) binding calls `requestSubmit()` to trigger the request — no submit button is required once JavaScript runs. Keep the `