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.
DropZone
The drop zone component lets customers upload files through drag-and-drop or by clicking to browse. Drop zone doesn't offer image upload preview capabilities because the extension and host operate on separate domains, which prevents the use of object URLs directly in an image component.
Any element focused within the drop zone component, including child elements such as the "Add file" button, will initiate the file selector when the Enter or Spacebar key is pressed.
Supported targets
- Customer
Account::Kitchen Sink - customer-account.
footer. render-after - customer-account.
order-index. announcement. render - customer-account.
order-index. block. render - customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render - customer-account.
page. render - customer-account.
profile. addresses. render-after - customer-account.
profile. announcement. render - customer-account.
profile. block. render - customer-account.
profile. company-details. render-after - customer-account.
profile. company-location-addresses. render-after - customer-account.
profile. company-location-payment. render-after - customer-account.
profile. company-location-staff. render-after - customer-account.
profile. payment. render-after
Supported targets
- Customer
Account::Kitchen Sink - customer-account.
footer. render-after - customer-account.
order-index. announcement. render - customer-account.
order-index. block. render - customer-account.
order-status. announcement. render - customer-account.
order-status. block. render - customer-account.
order-status. cart-line-item. render-after - customer-account.
order-status. cart-line-list. render-after - customer-account.
order-status. customer-information. render-after - customer-account.
order-status. fulfillment-details. render-after - customer-account.
order-status. payment-details. render-after - customer-account.
order-status. return-details. render-after - customer-account.
order-status. unfulfilled-items. render-after - customer-account.
order. action. menu-item. render - customer-account.
order. action. render - customer-account.
order. page. render - customer-account.
page. render - customer-account.
profile. addresses. render-after - customer-account.
profile. announcement. render - customer-account.
profile. block. render - customer-account.
profile. company-details. render-after - customer-account.
profile. company-location-addresses. render-after - customer-account.
profile. company-location-payment. render-after - customer-account.
profile. company-location-staff. render-after - customer-account.
profile. payment. render-after
Anchor to PropertiesProperties
Configure the following properties on the DropZone component.
- Anchor to acceptacceptacceptstringstring
A string representing the types of files that are accepted by the dropzone. This string is a comma-separated list of unique file type specifiers which can be one of the following:
- A file extension starting with a period (".") character (such as .jpg, .pdf, .doc)
- A valid MIME type string with no extensions
If left empty, the dropzone will accept all files.
Learn more about the
acceptattribute.- Anchor to accessibilityLabelaccessibilityLabelaccessibilityLabelstringstring
A label that describes the purpose or contents of the item. When set, it will be announced to users of assistive technologies and will provide them with more context.
- Anchor to disableddisableddisabledbooleanboolean
Whether the drop zone is disabled, preventing any user interaction.
- Anchor to errorerrorerrorstringstring
An error message displayed below the field to indicate validation problems. When set, the drop zone is styled with error indicators.
- Anchor to idididstringstring
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.
- Anchor to labellabellabelstringstring
The text displayed as the field label, which identifies the purpose of the drop zone to users.
- Anchor to multiplemultiplemultiplebooleanbooleanDefault: falseDefault: false
Defines if the user can select or drop multiple files at once.
- Anchor to namenamenamestringstring
An identifier for the field that is unique within the nearest containing
Formcomponent.- Anchor to onDropRejectedonDropRejectedonDropRejected(files: File[]) => void(files: File[]) => void
A callback fired when rejected files are dropped. Files are rejected based on the
acceptprop.- Anchor to onInputonInputonInput(files: File[]) => void(files: File[]) => void
A callback fired when files are dropped or selected.
Learn more about the
dropevent.- Anchor to requiredrequiredrequiredbooleanboolean
Whether the field needs a value. This requirement adds semantic value to the field, but it will not cause an error to appear automatically. If you want to present an error when this field is empty, you can do so with the
errorprop.
Anchor to ExamplesExamples
Anchor to Upload a fileUpload a file
Use drop zone to let customers upload files by dragging and dropping or clicking to browse. This example shows a basic file upload area with error handling and a drag-over state.Upload a file

Upload a file
React
import {
reactExtension,
DropZone,
} from '@shopify/ui-extensions-react/customer-account';
export default reactExtension(
'customer-account.page.render',
() => <Extension />,
);
function Extension() {
return <DropZone accept="image/*" />;
}JS
import {DropZone, extension} from '@shopify/ui-extensions/customer-account';
export default extension('customer-account.page.render', (root) => {
const dropZone = root.createComponent(DropZone, {
accept: 'image/*',
});
root.appendChild(dropZone);
});Anchor to Best practicesBest practices
- Specify accepted types: Use the
acceptproperty to restrict uploads to expected file types, such asimage/*orapplication/pdf. - Mobile considerations: Drag and drop functionality is limited on mobile devices. Include a button to help guide customers to select files.
- Minimum size: Keep the drop zone at least 100px × 100px to avoid cut-off text and spacing issues.
- Implement file storage separately: Use metafields and the Customer Accounts API to store references to uploaded files.
Anchor to LimitationsLimitations
- File storage must be implemented separately.
- Drag-and-drop doesn't work on mobile.