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.
View
View is a generic container component. Its contents will always be their “natural” size, so this component can be useful in layout components (like Grid, BlockStack, InlineStack) that would otherwise stretch their children to fit.
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
Anchor to ViewPropsView Props
View is a generic container component. Its contents will always be their “natural” size, so this component can be useful in layout components (like Grid, , ) that would otherwise stretch their children to fit.
- Anchor to accessibilityLabelaccessibilityLabelaccessibilityLabelstringstring
A label that describes the purpose or contents of the element. When set, it will be announced to buyers using assistive technologies and will provide them with more context.
- Anchor to accessibilityRoleaccessibilityRoleaccessibilityRoleViewLikeAccessibilityRoleViewLikeAccessibilityRole
Sets the semantic meaning of the component’s content. When set, the role will be used by assistive technologies to help buyers navigate the page.
For example:
In an HTML host a
tuple will render:<li role='separator'>In an HTML host a
string will render:<li>
- Anchor to accessibilityVisibilityaccessibilityVisibilityaccessibilityVisibilityAccessibilityVisibilityAccessibilityVisibility
Changes the visibility of the element to assistive technologies.
hiddenhides the component from assistive technology (for example, a screen reader) but remains visually visible.- Anchor to backgroundbackgroundbackgroundMaybeConditionalStyle<Background>MaybeConditionalStyle<Background>Default: 'transparent'Default: 'transparent'
The background color of the element, set using a design-system keyword.
transparent: No background; the parent's background shows through.base: The standard surface background color.subdued: A muted background for de-emphasized or secondary content.
- Anchor to blockAlignmentblockAlignmentblockAlignmentMaybeResponsiveConditionalStyle< Extract<BlockAlignment, 'start' | 'center' | 'end'> >MaybeResponsiveConditionalStyle< Extract<BlockAlignment, 'start' | 'center' | 'end'> >
Position children along the cross axis
- Anchor to borderborderborderMaybeResponsiveConditionalStyle<MaybeShorthandProperty<BorderStyle>>MaybeResponsiveConditionalStyle<MaybeShorthandProperty<BorderStyle>>
The border style of the element.
To shorten the code, it is possible to specify all the border style properties in one property.
For example:
basemeans blockStart, inlineEnd, blockEnd and inlineStart border styles arebase['base', 'none']means blockStart and blockEnd border styles arebase, inlineStart and inlineEnd border styles arenone['base', 'none', 'dotted', 'base']means blockStart border style isbase, inlineEnd border style isnone, blockEnd border style isdottedand blockStart border style isbase
- Anchor to borderWidthborderWidthborderWidthMaybeResponsiveConditionalStyle< MaybeShorthandProperty<BorderWidth> >MaybeResponsiveConditionalStyle< MaybeShorthandProperty<BorderWidth> >
The border width of the element.
To shorten the code, it is possible to specify all the border width properties in one property.
For example:
basemeans blockStart, inlineEnd, blockEnd and inlineStart border widths arebase['base', 'medium']means blockStart and blockEnd border widths arebase, inlineStart and inlineEnd border widths aremedium['base', 'medium', 'medium', 'base']means blockStart border width isbase, inlineEnd border width ismedium, blockEnd border width ismediumand blockStart border width isbase
- Anchor to cornerRadiuscornerRadiuscornerRadiusMaybeResponsiveConditionalStyle< MaybeShorthandProperty<CornerRadius> >MaybeResponsiveConditionalStyle< MaybeShorthandProperty<CornerRadius> >
The corner radius of the element.
Provide a single value to apply the same corner radius to all four corners, two values to apply different corner radii to opposing corners, or four values to apply different corner radii to each individual corner.
For example:
basemeans all 4 corner radii arebase['base', 'none']means the StartStart and EndEnd corner radii arebase, StartEnd and EndStart corner radii arenone. When the context’s language direction is left to right, StartStart and EndEnd corners are the top left and bottom right corners while StartEnd and EndStart corners are the top right and bottom left corners.['base', 'none', 'small', 'base']means StartStart corner radius isbase, StartEnd corner radius isnone, EndEnd corner radius issmalland EndStart corner radius isbase
A
alias is available for this property. When both are specified,takes precedence.- Anchor to displaydisplaydisplayMaybeResponsiveConditionalStyle<Display>MaybeResponsiveConditionalStyle<Display>Default: 'auto'Default: 'auto'
Changes the display of the component.
inlinethe component starts on the same line as preceding inline content and allows subsequent content to continue on the same line.blockthe component starts on its own new line and fills its parent.autoresets the component to its initial value. The actual value depends on the component and context.nonehides the component and removes it from the accessibility tree, making it invisible to screen readers.- Anchor to idididstringstring
A unique identifier for the component.
- Anchor to inlineAlignmentinlineAlignmentinlineAlignmentMaybeResponsiveConditionalStyle<InlineAlignment>MaybeResponsiveConditionalStyle<InlineAlignment>
Position children along the main axis
- Anchor to inlineSizeinlineSizeinlineSizeMaybeResponsiveConditionalStyle<'fill'>MaybeResponsiveConditionalStyle<'fill'>
Adjust the inline size.
fill: takes all the available space.- Anchor to maxBlockSizemaxBlockSizemaxBlockSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The maximum block size (maximum height in horizontal writing modes). The element won't grow taller than this value even if its content is longer.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.'fill': Takes all the available space.
Learn more about the max-block-size property.
- Anchor to maxInlineSizemaxInlineSizemaxInlineSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The maximum inline size (maximum width in horizontal writing modes). The element won't grow wider than this value.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.'fill': Takes all the available space.
Learn more about the max-inline-size property.
- Anchor to minBlockSizeminBlockSizeminBlockSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The minimum block size (minimum height in horizontal writing modes). The element won't shrink smaller than this value even if its content is shorter.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's block size.'fill': Takes all the available space.
Learn more about the min-block-size property.
- Anchor to minInlineSizeminInlineSizeminInlineSizeMaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >MaybeResponsiveConditionalStyle< number | `${number}%` | 'fill' >
The minimum inline size (minimum width in horizontal writing modes). The element won't shrink narrower than this value.
number: The size in pixels.`${number}%`: The size as a percentage of the parent container's inline size.'fill': Takes all the available space.
Learn more about the min-inline-size property.
- Anchor to opacityopacityopacityOpacityOpacity
Sets the opacity of the View. The opacity will be applied to the background as well as all the children of the View. Use carefully as this could decrease the contrast ratio between the background and foreground elements, resulting in unreadable and inaccessible text.
- Anchor to overflowoverflowoverflow'hidden' | 'visible''hidden' | 'visible'Default: 'visible'Default: 'visible'
Sets the overflow behavior of the element.
hidden: clips the content when it is larger than the element’s container. The element will not be scrollable and the users will not be able to access the clipped content by dragging or using a scroll wheel.visible: the content that extends beyond the element’s container is visible.- Anchor to paddingpaddingpaddingMaybeResponsiveConditionalStyle<MaybeShorthandProperty<Spacing>>MaybeResponsiveConditionalStyle<MaybeShorthandProperty<Spacing>>
The padding on all edges of the element, using a shorthand syntax. You can specify one, two, or four values following the CSS shorthand convention.
T: A single value applied uniformly to all edges.[T, T]: The first value applies to block-start and block-end, the second to inline-start and inline-end.[T, T, T, T]: Values apply to block-start, inline-end, block-end, and inline-start respectively.
- Anchor to positionpositionpositionMaybeResponsiveConditionalStyle<Position>MaybeResponsiveConditionalStyle<Position>
Changes how the
Viewis positioned. When settingposition, set each axis only once.- Anchor to translatetranslatetranslateMaybeResponsiveConditionalStyle<Translate>MaybeResponsiveConditionalStyle<Translate>
Specifies a two-dimensional translation of the View.
- Anchor to visibilityvisibilityvisibilityVisibilityVisibility
Changes the visibility of the element.
hiddenvisually hides the component while keeping it accessible to assistive technology, such as screen readers. Hidden elements don't take any visual space contrary to CSS visibility: hidden;- Anchor to borderRadiusborderRadiusborderRadiusMaybeResponsiveConditionalStyle< MaybeShorthandProperty<CornerRadius> >MaybeResponsiveConditionalStyle< MaybeShorthandProperty<CornerRadius> >deprecateddeprecated
- Deprecated
Use
instead.The corner radius of the element. Accepts a single value for all corners or a shorthand tuple for per-corner control.
Deprecated:Use
instead.The corner radius of the element. Accepts a single value for all corners or a shorthand tuple for per-corner control.
ViewLikeAccessibilityRole
NonPresentationalAccessibilityRole | [NonPresentationalAccessibilityRole, NonPresentationalAccessibilityRole]NonPresentationalAccessibilityRole
'main' | 'header' | 'footer' | 'section' | 'complementary' | 'navigation' | 'orderedList' | 'listItem' | 'unorderedList' | 'separator' | 'status' | 'alert'AccessibilityVisibility
'hidden'MaybeConditionalStyle
A type that represents a value that can be a conditional style. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.
T | ConditionalStyle<T, AcceptedConditions>ConditionalStyle
A conditional style definition that maps one or more conditions to different values. The `default` value is used as a fallback when none of the conditions in `conditionals` are satisfied.
- conditionals
An array of conditional values.
ConditionalValue<T, AcceptedConditions>[] - default
The default value applied when none of the conditional values specified in `conditionals` are met.
T
ConditionalValue
A single conditional branch that pairs a set of conditions with the value to apply when those conditions are met.
- conditions
The conditions that must be met for the value to be applied. At least one condition must be specified.
AcceptedConditions - value
The value that will be applied if the conditions are met.
T
Background
A keyword that maps to a predefined background color from the design system. - `transparent`: No background color; the parent's background shows through. - `base`: The standard surface background color. - `subdued`: A muted background color, typically used to de-emphasize content or distinguish secondary areas from the primary surface.
'transparent' | 'base' | 'subdued'MaybeResponsiveConditionalStyle
A type that represents a value that can be a conditional style. The conditions are based on the viewport size. We highly recommend using the `Style` helper which simplifies the creation of conditional styles.
T | ConditionalStyle<T, ViewportSizeCondition>ViewportSizeCondition
A condition that targets layouts based on the inline size (width in horizontal writing modes) of the viewport.
- viewportInlineSize
The minimum viewport inline size that the condition must match.
{ min: T; }
BlockAlignment
Controls how content is aligned along the block axis (vertical in standard writing modes). - `'start'`: Aligns content to the block start of the container. - `'center'`: Centers content along the block axis. - `'end'`: Aligns content to the block end of the container. - `'baseline'`: Aligns content so their text baselines line up.
Alignment | 'baseline'Alignment
Controls how content is aligned along the cross axis. - `'start'`: Aligns content to the start of the container. - `'center'`: Centers content within the container. - `'end'`: Aligns content to the end of the container.
'start' | 'center' | 'end'MaybeShorthandProperty
A type that accepts either a single value applied to all edges or a shorthand tuple for per-edge control. - `T`: A single value applied uniformly to all edges. - `[T, T]`: The first value applies to block-start and block-end, the second to inline-start and inline-end. - `[T, T, T, T]`: Values apply to block-start, inline-end, block-end, and inline-start respectively.
T | ShorthandProperty<T>ShorthandProperty
A tuple type that accepts two or four values following the CSS shorthand convention for box edges. - `[T, T]`: The first value applies to block-start and block-end, the second to inline-start and inline-end. - `[T, T, T, T]`: Values apply to block-start, inline-end, block-end, and inline-start respectively.
[T, T] | [T, T, T, T]BorderStyle
A keyword that maps to a predefined border style from the design system. - `base`: A solid border line, suitable for most use cases. - `dashed`: A dashed border line, often used for drop zones or placeholder boundaries. - `dotted`: A dotted border line. - `none`: No border is rendered.
'base' | 'dashed' | 'dotted' | 'none'CornerRadius
A keyword that maps to a predefined corner radius from the design system. - `base`: The default corner radius. - `small`: A subtle corner radius, smaller than `base`. - `large`: A pronounced corner radius, larger than `base`. - `fullyRounded`: Fully rounds the corners into a pill or circle shape. - `none`: No corner rounding; sharp square corners.
'base' | 'small' | 'large' | 'fullyRounded' | 'none' | CornerRadiusDeprecatedCornerRadiusDeprecated
'tight' | 'loose'BorderWidth
A keyword that maps to a predefined border width from the design system. - `base`: The default border width. - `medium`: A medium border width, thicker than `base`. - `thick`: The thickest available border width.
'base' | 'medium' | 'thick'Display
'none' | 'auto' | 'inline' | 'block'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'Opacity
10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90Spacing
A keyword that maps to a predefined spacing value from the design system. Use these instead of pixel values to ensure consistent spacing throughout the UI. - `none`: No spacing (0px). - `extraTight`: The smallest amount of spacing. - `tight`: A compact amount of spacing, suitable for tight layouts. - `base`: The default spacing, appropriate for most layouts. - `loose`: A generous amount of spacing, used to create visual separation. - `extraLoose`: The largest amount of spacing.
'none' | 'extraTight' | 'tight' | 'base' | 'loose' | 'extraLoose'Position
PositionBlockStartInlineStart | PositionBlockStartInlineEnd | PositionBlockEndInlineStart | PositionBlockEndInlineEndPositionBlockStartInlineStart
- blockEnd
undefined - blockStart
Adjust the block start offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - inlineEnd
undefined - inlineStart
Adjust the inline start offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - type
Changes how the `View` is positioned.
PositionType
Coordinate
number | `${number}%`PositionType
'absolute' | 'relative' | 'sticky'PositionBlockStartInlineEnd
- blockEnd
undefined - blockStart
Adjust the block start offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - inlineEnd
Adjust the inline end offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - inlineStart
undefined - type
Changes how the `View` is positioned.
PositionType
PositionBlockEndInlineStart
- blockEnd
Adjust the block end offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - blockStart
undefined - inlineEnd
undefined - inlineStart
Adjust the inline start offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - type
Changes how the `View` is positioned.
PositionType
PositionBlockEndInlineEnd
- blockEnd
Adjust the block end offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - blockStart
undefined - inlineEnd
Adjust the inline end offset. `number`: size in pixels. `` `${number}%` ``: size in percentages. It refers to the block size of the parent component.
Coordinate - inlineStart
undefined - type
Changes how the `View` is positioned.
PositionType
Translate
- block
Adjust the translation on the cross axis. A percentage value refers to the block size of the View.
number | `${number}%` - inline
Adjust the translation on the main axis. A percentage value refers to the inline size of the View.
number | `${number}%`
Visibility
'hidden'Anchor to ExamplesExamples
Anchor to Basic ViewBasic View
Basic View

Basic View
React
import {
reactExtension,
View,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return (
<View padding="base" border="base">
View
</View>
);
}JS
import {extension, View} from '@shopify/ui-extensions/checkout';
export default extension('purchase.checkout.block.render', (root) => {
const view = root.createComponent(
View,
{border: 'base', padding: 'base'},
'View',
);
root.appendChild(view);
});Anchor to Accessibility rolesAccessibility roles
| Value | Description |
|---|---|
"main" | Used to indicate the primary content. |
"header" | Used to indicate the component is a header. |
"footer" | Used to display information such as copyright information, navigation links, and privacy statements. |
"section" | Used to indicate a generic section. |
"complementary" | Used to designate a supporting section that relates to the main content. |
"navigation" | Used to identify major groups of links used for navigating. |
"orderedList" | Used to identify a list of ordered items. |
"listItem" | Used to identify an item inside a list of items. |
"unorderedList" | Used to identify a list of unordered items. |
"separator" | Used to indicates the component acts as a divider that separates and distinguishes sections of content. |
"status" | Used to define a live region containing advisory information for the user that is not important enough to be an alert. |
"alert" | Used for important, and usually time-sensitive, information. |