@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.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

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

    Weekly Downloads

    57

    Version

    0.0.63

    License

    MIT

    Unpacked Size

    150 kB

    Total Files

    114

    Last publish

    Collaborators

    • jaimie.rockburn
    • blittle
    • shopify-admin
    • maryharte
    • crisfmb
    • pmoloney89
    • netlohan
    • st999999
    • justin-irl
    • megswim
    • wcandillon
    • nathanpjf
    • shopify-dep
    • goodforonefare
    • lemonmade
    • vsumner
    • wizardlyhel
    • antoine.grant
    • tsov
    • andyw8-shopify
    • henrytao
    • hannachen
    • vividviolet
    • bpscott