Skip to main content

AdminPrintAction

AdminPrintAction is a component used by admin print action extensions to denote a URL to print. Admin print action extensions require the use of this component.

Anchor to adminprintactionpropsAdminPrintActionProps

string

Sets the src URL of the preview and the document to print. If not provided, the preview will show an empty state and the print button will be disabled. HTML, PDFs and images are supported.

Was this section helpful?

Set the source URL of the print action extension.

import React from 'react';
import {
reactExtension,
AdminPrintAction,
Text,
} from '@shopify/ui-extensions-react/admin';

function App() {
return (
<AdminPrintAction src="https://example.com">
<Text>Modal content</Text>
</AdminPrintAction>
);
}

export default reactExtension(
'Playground',
() => <App />,
);

Preview