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.
Button
Buttons are used for actions, such as “Add”, “Continue”, “Apply”, or “Save”.
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
Supported targets
- Checkout::Actions::Render
Before - Checkout::Cart
Line Details::Render After - Checkout::Cart
Lines::Render After - Checkout::Contact::Render
After - Checkout::Customer
Information::Render After - Checkout::Delivery
Address::Render Before - Checkout::Dynamic::Render
- Checkout::Pickup
Locations::Render After - Checkout::Pickup
Locations::Render Before - Checkout::Pickup
Points::Render After - Checkout::Pickup
Points::Render Before - Checkout::Reductions::Render
After - Checkout::Reductions::Render
Before - Checkout::Shipping
Method Details::Render After - Checkout::Shipping
Method Details::Render Expanded - Checkout::Shipping
Methods::Render After - Checkout::Shipping
Methods::Render Before - Checkout::Thank
You::Cart Line Details::Render After - Checkout::Thank
You::Cart Lines::Render After - Checkout::Thank
You::Customer Information::Render After - Checkout::Thank
You::Dynamic::Render - purchase.
checkout. actions. render-before - purchase.
checkout. block. render - purchase.
checkout. cart-line-item. render-after - purchase.
checkout. cart-line-list. render-after - purchase.
checkout. contact. render-after - purchase.
checkout. delivery-address. render-after - purchase.
checkout. delivery-address. render-before - purchase.
checkout. footer. render-after - purchase.
checkout. header. render-after - purchase.
checkout. payment-method-list. render-after - purchase.
checkout. payment-method-list. render-before - purchase.
checkout. pickup-location-list. render-after - purchase.
checkout. pickup-location-list. render-before - purchase.
checkout. pickup-location-option-item. render-after - purchase.
checkout. pickup-point-list. render-after - purchase.
checkout. pickup-point-list. render-before - purchase.
checkout. reductions. render-after - purchase.
checkout. reductions. render-before - purchase.
checkout. shipping-option-item. details. render - purchase.
checkout. shipping-option-item. render-after - purchase.
checkout. shipping-option-list. render-after - purchase.
checkout. shipping-option-list. render-before - purchase.
thank-you. announcement. render - purchase.
thank-you. block. render - purchase.
thank-you. cart-line-item. render-after - purchase.
thank-you. cart-line-list. render-after - purchase.
thank-you. customer-information. render-after - purchase.
thank-you. footer. render-after - purchase.
thank-you. header. render-after
- stringstring
A label that describes the purpose or content of the button for users of assistive technologies such as screen readers. When set, any
childrensupplied to this component won't be announced to screen reader users.- ButtonAccessibilityRoleButtonAccessibilityRoleDefault: 'button'Default: 'button'
The role of the button that will be rendered.
'button': Renders a regular button.'submit': Renders a button that submits a form.
- 'auto' | 'copy''auto' | 'copy'Default: 'auto' - a default action for the target component.Default: 'auto' - a default action for the target component.
- stringstring
The ID of the component to control when this component is activated. Pair with the
property to specify what action to perform on the target component.- 'critical' | 'monochrome''critical' | 'monochrome'
The semantic meaning and color treatment of the button, such as
'critical'for destructive actions or'monochrome'for a neutral appearance.- booleanbooleanDefault: falseDefault: false
Whether the button is disabled, preventing it from being activated or receiving focus.
- stringstring
A unique identifier for the component. Use this to target the component in scripts or stylesheets, or to distinguish it from other instances of the same component.
- InlineAlignmentInlineAlignmentDefault: 'center'Default: 'center'
Specifies the inline alignment of the content.
- 'primary' | 'secondary' | 'plain''primary' | 'secondary' | 'plain'Default: 'primary'Default: 'primary'
The visual style variant of the button, which controls its prominence and emphasis. The visual presentation is controlled through the Branding API.
'primary': High-emphasis style for main actions, such as "Continue to next step."'secondary': Medium-emphasis style for secondary actions that don't block user progress, such as "Download Shop app."'plain': Renders the button with a link-like appearance.
- booleanbooleanDefault: falseDefault: false
Whether the button is in a loading state, which replaces the button content with a loading indicator while a background action is being performed. This also disables the button.
- stringstring
Accessible label for the loading indicator when user prefers reduced motion. This value is only used if
loadingis true.- () => void() => void
A callback fired when the button is activated by the user.
- RemoteFragmentRemoteFragment
An overlay component to render when the user interacts with the component, such as a popover, modal, or tooltip.
- stringstring
The URL to navigate to when the button is activated. The
callback fires first, then navigation occurs.- stringstring
The ID of the component whose visibility will be toggled when this component is activated. Use this to show or hide related content like a disclosure panel.
- booleanbooleandeprecateddeprecated
Whether the button submits the nearest containing form when activated.
DeprecatedUse
instead.Deprecated:Use
instead.
ButtonAccessibilityRole
The accessibility role for button-like components. - `button`: A generic button that triggers an action. - `submit`: A button that submits a form.
'button' | 'submit'InlineAlignment
Controls how content is aligned along the inline axis (horizontal in standard writing modes). - `'start'`: Aligns content to the inline start of the container. - `'center'`: Centers content along the inline axis. - `'end'`: Aligns content to the inline end of the container.
'start' | 'center' | 'end'Anchor to ExamplesExamples
Basic Button

Basic Button
React
import {
reactExtension,
Button,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return (
<Button
onPress={() => {
console.log('onPress event');
}}
>
Pay now
</Button>
);
}JS
import {extension, Button} from '@shopify/ui-extensions/checkout';
export default extension('purchase.checkout.block.render', (root) => {
const button = root.createComponent(
Button,
{onPress: () => console.log('onPress event')},
'Pay now',
);
root.appendChild(button);
});Anchor to AppearanceAppearance
| Value | Description |
|---|---|
"critical" | Conveys a problem has arisen. |
"monochrome" | Takes the color of its parent. |
Anchor to Best PracticesBest Practices
Content best practices
-
Clearly label each button to accurately represent the action associated with it.
-
Use strong actionable verbs at the beginning of button text to make it clear to the buyer what action occurs when the button is clicked.
Hierarchy best practices
-
Establish a visual hierarchy between buttons to minimize confusion and help buyers understand which actions are most important.
-
Use only one high-emphasis button (primary button) per context to make it clear that other buttons have less importance.
-
Use lower-emphasis buttons for secondary calls to action.
-
Use primary buttons for concluding an action in a modal such as “Apply” or for key extension actions like “Add gift message.”
-
Use secondary buttons to provide alternative actions to the primary button, without disrupting the primary flow such as “Track your order”.
-
Use plain buttons for least prominent, non-critical actions such as “Login to your account”.
When to use buttons
-
Use buttons to communicate actions the buyer can take.
-
Use buttons to allow buyers to interact with the page.
When not to use buttons
- Don’t use buttons as navigational elements. Use links instead when the desired action is to take the buyer to a new page.