Skip to main content
Migrate to Polaris

Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.

Block Extension API

Requires the AdminBlock component.

The Block Extension API lets you build block extensions that display inline content directly within admin pages. Use this API to show contextual information, tools, or actions related to the current page without requiring merchants to open a modal.

  • Inline extensions: Create block extensions that render inline content directly on admin pages.
  • Contextual information: Display contextual data or tools related to the current resource.
  • Action navigation: Navigate to action extensions from blocks for complex workflows.
  • Page integration: Integrate with admin pages without modal overlays.

The Block Extension API object provides properties for block extensions that render inline content on admin pages. Access the following properties on the API object to interact with the current context, navigate to other extensions, and display picker dialogs.

required

Provides methods for authenticating calls to your app backend. Use the idToken() method to retrieve a signed JWT token that verifies the current user's identity for secure server-side operations.

required

An array of currently viewed or selected resource identifiers. Use this to access the IDs of items in the current context, such as selected products in an index page or the product being viewed on a details page. The available IDs depend on the extension target and user interactions.

Anchor to extension
extension
{ target: ; }
required

The identifier of the running extension target. Use this to determine which target your extension is rendering in and conditionally adjust functionality or UI based on the extension context.

required

Utilities for translating content according to the current localization of the admin. Use these methods to provide translated strings that match the merchant's language preferences, ensuring your extension is accessible to a global audience.

Anchor to intents
intents
required

Provides information to the receiver of an intent. Use this to access data passed from other extensions or parts of the admin when your extension is launched through intent-based navigation.

Anchor to navigation
navigation
required

Navigates to other extensions or admin pages. Currently supports navigation from a block to an action extension on the same resource page. For example, navigate from a product details block (admin.product-details.block.render) to a product details action (admin.product-details.action.render).

Anchor to picker
picker
required

Opens a custom Picker API dialog for selecting from a list of custom options. Use this when you need merchants to choose from app-specific data that isn't a standard Shopify resource.

Anchor to query
query
< = unknown, Variables = { [key: string]: unknown; }>(query: string, options?: { variables?: Variables; version?: Omit<, "2023-04">; }) => Promise<{ data?: ; errors?: []; }>
required

Executes GraphQL queries against the GraphQL Admin API. Use this to fetch shop data, manage resources, or perform mutations. Queries are automatically authenticated with the current user's permissions. Optionally specify GraphQL variables and API version for your query.

Anchor to resourcePicker
resourcePicker
required

Opens the Resource Picker API modal for selecting products, variants, or collections. Use this to let merchants choose resources that your extension needs to work with.


  • Test layouts at narrow widths: Block extensions render in responsive containers that resize with browser width. Test down to ~300px where blocks stack vertically to ensure your UI remains usable.
  • Defer expensive operations until user interaction: Blocks render immediately when pages load. Defer expensive operations until user interaction to avoid slowing down page rendering for merchants.

  • Block extensions share horizontal space with other blocks and must adapt to variable container widths. Placement order is determined by Shopify and can't be configured.
  • Navigation is limited to action extensions on the same resource page. You can't navigate to detail pages of other resources or to index pages.
  • Block extensions don't have access to information about other extensions on the page and can't communicate with them.

Was this page helpful?