@shopify/customer-account-ui-extensions
TypeScript icon, indicating that this package has built-in type declarations

0.0.63 • Public • Published

Customer Account UI Extensions

Customer Account UI Extensions is a library that enables developers to write custom JavaScript to be sent to and rendered within the Shopify Customer Account web application.

Usage

There are multiple ways to use Customer Account UI Extensions components in your extension.

Vanilla JS

Adding a button looks like the following:

import {extend, Button} from '@shopify/customer-account-ui-extensions';

extend('CustomerAccount::FullPage::RenderWithin', (root, api) => {
  const button = root.createComponent(Button, {
    title: 'Press Me',
    primary: true,
    onPress: () => console.log('Pressed'),
  });

  root.appendChild(button);
});

React

To use the React implementation, check out packages/customer-account-ui-extensions-react.

Readme

Keywords

none

Package Sidebar

Install

npm i @shopify/customer-account-ui-extensions

Weekly Downloads

11

Version

0.0.63

License

MIT

Unpacked Size

150 kB

Total Files

114

Last publish

Collaborators

  • jaykay101
  • mishsmelle
  • shopify-dep
  • jaimie.rockburn
  • shopify-admin
  • maryharte
  • pmoloney89
  • netlohan