Admin action
The admin action component configures the primary action, secondary action, and title for admin action extensions. Use admin action to define the core interaction points and header content that merchants see when your extension renders.
Learn how to build an admin action extension.
Supported targets
- admin.
abandoned-checkout-details. action. render - admin.
catalog-details. action. render - admin.
collection-details. action. render - admin.
collection-index. action. render - admin.
company-details. action. render - admin.
customer-details. action. render - admin.
customer-index. action. render - admin.
customer-index. selection-action. render - admin.
customer-segment-details. action. render - admin.
discount-details. action. render - admin.
discount-index. action. render - admin.
draft-order-details. action. render - admin.
draft-order-index. action. render - admin.
draft-order-index. selection-action. render - admin.
gift-card-details. action. render - admin.
order-details. action. render - admin.
order-fulfilled-card. action. render - admin.
order-index. action. render - admin.
order-index. selection-action. render - admin.
product-details. action. render - admin.
product-index. action. render - admin.
product-index. selection-action. render - admin.
product-purchase-option. action. render - admin.
product-variant-details. action. render - admin.
product-variant-purchase-option. action. render
Supported targets
- admin.
abandoned-checkout-details. action. render - admin.
catalog-details. action. render - admin.
collection-details. action. render - admin.
collection-index. action. render - admin.
company-details. action. render - admin.
customer-details. action. render - admin.
customer-index. action. render - admin.
customer-index. selection-action. render - admin.
customer-segment-details. action. render - admin.
discount-details. action. render - admin.
discount-index. action. render - admin.
draft-order-details. action. render - admin.
draft-order-index. action. render - admin.
draft-order-index. selection-action. render - admin.
gift-card-details. action. render - admin.
order-details. action. render - admin.
order-fulfilled-card. action. render - admin.
order-index. action. render - admin.
order-index. selection-action. render - admin.
product-details. action. render - admin.
product-index. action. render - admin.
product-index. selection-action. render - admin.
product-purchase-option. action. render - admin.
product-variant-details. action. render - admin.
product-variant-purchase-option. action. render
Anchor to PropertiesProperties
Configure the following properties on the admin action component.
- Anchor to headingheadingheadingstringstring
The text to use as the action modal's title. If not provided, the name of the extension will be used.
- Anchor to loadingloadingloadingbooleanbooleanDefault: falseDefault: false
Whether the action is in a loading state, such as during initial page load or when the action is being opened. When
true, the action is in an inert state that prevents user interaction.
Anchor to SlotsSlots
The admin action component supports slots for additional content placement within the component. Learn more about using slots.
- Anchor to primary-actionprimary-actionprimary-actionHTMLElementHTMLElementrequiredrequired
The main action button or link displayed in the admin action modal. This represents the primary or most important action that users can take in this modal context, typically displayed with high visual prominence.
- Anchor to secondary-actionssecondary-actionssecondary-actionsHTMLElementHTMLElementrequiredrequired
Additional action buttons or links displayed in the admin action modal. These provide alternative or supporting actions, visually de-emphasized compared to the primary action to establish clear hierarchy.
Anchor to ExamplesExamples
Anchor to Configure an admin action modalConfigure an admin action modal
Set up the modal header and action buttons for an admin action extension. This example shows a titled modal with primary and secondary action buttons.
Preview
html
Anchor to Show a loading stateShow a loading state
Show a loading indicator while data is being fetched or processed. This example sets the loading property to display a loading state and disables the primary button.
Preview
html
Anchor to Add form fields to the modalAdd form fields to the modal
Collect merchant input inside the action modal using form fields. This example includes a text field and number field arranged in a stack.
Preview
html
Anchor to Confirm a destructive actionConfirm a destructive action
Warn merchants before a permanent operation like deleting a resource. This example uses a critical banner and a destructive primary button to confirm deletion.
Preview
html
Anchor to Show resource details in a modalShow resource details in a modal
Display read-only resource information inside a modal before the merchant takes action. This example shows an order summary with badges, dividers, and a fulfillment button.
Preview
html
Anchor to Best practicesBest practices
- Use action-oriented labels: Write labels using the
{verb}+{noun}format like Save changes, Delete product, or Create discount rather than generic labels like Submit or OK. - Follow action hierarchy: Primary actions complete or advance the workflow (like Save or Publish), while secondary actions cancel or go back (like Cancel or Discard changes).
- Write descriptive titles: Titles should name the specific task like Edit shipping settings or Archive old orders, not generic phrases like Actions or Settings.
- Limit to one task per action: Each button should trigger a single operation. If you need multiple steps, guide merchants through them sequentially rather than combining operations.