Skip to content

Shopify’s design system to help us work together to build a great experience for all of our merchants.

License

Notifications You must be signed in to change notification settings

Shopify/polaris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polaris React

CircleCI

The reference implementation of Polaris, written in React and TypeScript.

This is the internal version of the Polaris repository. All changes and issues should be made here, and the changes will be applied to the public version when we release a new version.

Development

We’ve created a simple, hot-reloading playground for development on these components. You can edit the playground/Playground.tsx file to import the components you are working on, and run yarn dev in order to start the development server. Please do not commit your work on the playground so that it is pristine for other developers to work on.

Testing on mobile or a virtual machine

  1. Run yarn dev:host
  2. Visit http://YOUR_IP_ADDRESS:ASSIGNED_PORT in a browser window from within your virtual machine or mobile device on the same network

Testing in a consuming project

  • Run yarn run build-consumer PROJECT_DIRECTORY

PROJECT_DIRECTORY is where the build will be copied, which must be a sibling of the polaris-react directory.

# Example
yarn run build-consumer polaris-styleguide

In the example above, the build is copied to polaris-styleguide/node_modules/@shopify/polaris. And in this case, a rebuild of polaris-styleguide is required after copying the polaris-react build, but may not be the case for all consuming projects.

# Example
dev cd polaris-styleguide
yarn run build:development

Also, when running yarn install (which often happens as part of dev up), copied builds will be overwritten and will require running yarn run build-consumer PROJECT_DIRECTORY again.


See Neutron Technical Brief: Outside Admin for more details.