Optional Consent for scopes, launching Intents from the Shop app, storage limits, availableForSale exposure, and more — a major update that changes how you build Minis.
Consent isn't all-or-nothing. Even when some scopes are denied, the Mini must keep running. Handle it with the three new hooks.
Launch a Mini "with context" from product pages and more in the Shop app. try_on / view_in are available today.
Limits on async storage. localStorage/sessionStorage deprecated. availableForSale exposure for inventory consistency.
Use it when conditionally rendering UI that depends on scopes.
import {useCheckScopesConsent} from '@shopify/shop-minis-react' function MyMini() { const {scopes} = useCheckScopesConsent() if (scopes.includes('product_lists:write')) { return <SaveToListButton /> } return <SignInPrompt /> }
You can't re-prompt automatically. It takes a button press, etc. Must be invoked in response to a user action.
import {useRequestScopesConsent} from '@shopify/shop-minis-react' function GrantAccessButton() { const {requestScopesConsent} = useRequestScopesConsent() return ( <button onClick={() => requestScopesConsent(['product_lists:write'])}> Enable saving products </button> ) }
A separate layer from scopes. Lets you check whether OS permissions like the camera / photo library are granted.
import {useCheckPermissions} from '@shopify/shop-minis-react' function CameraFeature() { const {permissions} = useCheckPermissions(['camera']) if (permissions.camera === 'granted') { return <CameraView /> } return <RequestCameraButton /> }
| Intent | Use case | Main targets |
|---|---|---|
| try_on | Virtual try-on Mini | Clothing, accessories, and wearables in general |
| view_in | AR / room placement Mini | Furniture, interior decor, and anything you want to see placed in a space |
import {useIntent} from '@shopify/shop-minis-react' function MyMini() { const intent = useIntent() if (intent?.action === 'try_on') { return <TryOn productId={intent.productId} /> } return <DefaultExperience /> }
useAsyncStorage and useSecureStorage now have 10 keys per Mini / 1 MB per key limits. This keeps Minis lightweight.
For large assets like images, the recommended approach is to "convert them to URLs via the upload hook and store those."
availableForSale is now exposed on variant.AddToCartButton/BuyNowButton automatically handle the out-of-stock state. If you build a custom cart UI, check it explicitly.
npx minis create , auto-detecting pnpm in addition to npm/yarn. You can now select pnpm in the prompt when creating a project.
| Package | Version |
|---|---|
| @shopify/shop-minis-platform | 0.17.0 |
| @shopify/shop-minis-react | 0.20.0 |
| @shopify/shop-minis-cli | 0.3.11 |
Importing packages not declared in package.json is flagged by ESLint.
clsx / tailwind-merge / cva are now explicitly allowed for use by partners.
The SDK build has been updated to TypeScript 6.0.2 (from 5.8.3).
The Scopes Consent page on shopify.dev now supports optional consent. It documents the granted/declined/request_blocked state machine and guidance for the three new hooks.
A new documentation page has been added. It explains end-to-end what intents are, the current intents (try_on/view_in), the launch-context contract, and how to parse them with useIntent.
granted / declined / request_blocked. request_blocked in particular is a "can no longer ask" state, so on the Mini side you should switch your design to an "explaining UI" rather than a "prompting UI" .
useRequestScopesConsent can only be triggered by a user action. By design, auto re-prompt implementations using useEffect and the like simply won't fire.
Even for the same "camera feature," you need to evaluate scope (Shopify permission) and permission (OS permission) as separate layers. Combine useCheckScopesConsent and useCheckPermissions.
Existing codebases need to be migrated. Since ESLint can detect this mechanically, making CI fail on it is a safe practice to adopt. Replace them with useAsyncStorage / useSecureStorage.
Launching from places like product details in the Shop app = broadens distribution that used to rely only on the Explore tab. It's best to build in from the start a design (routing) that reads the launch context with useIntent and navigates to the appropriate screen. They've announced that even unsupported intents can become candidates for new scoping if you contact the Shop Minis team.
npx minis create supported with a single command.