@superops/ui-design-system
TypeScript icon, indicating that this package has built-in type declarations

1.11.2 • Public • Published

Using the React components

While we do offer a CSS-only version, we strongly recommend using the React versions of our components. It’s the version that we use at Shopify. It allows for rich, complex components like Tabs and Popovers, and will not have as many breaking changes as the CSS-only version.

Installation

Run the following command using npm:

npm install @superops/ui-design-system --save

Usage

  1. Import the CSS directly into your project if your asset packager supports it:
import '@superops/ui-design-system/build/esm/styles.css';
  1. Include the translations and any of the provided components in your project:
import enTranslations from '@superops/ui-design-system/locales/en.json';
import {AppProvider, Page, Card, Button} from '@superops/ui-design-system';
  1. Tell React to render the element in the DOM:
ReactDOM.render(
  <AppProvider i18n={enTranslations}>
    <Page title="Example app">
      <Card sectioned>
        <Button onClick={() => alert('Button clicked!')}>Example button</Button>
      </Card>
    </Page>
  </AppProvider>,
  document.querySelector('#app'),
);

Package Sidebar

Install

npm i @superops/ui-design-system

Weekly Downloads

164

Version

1.11.2

License

SEE LICENSE IN LICENSE.md

Unpacked Size

10.8 MB

Total Files

3233

Last publish

Collaborators

  • superopsai