Skip to main content
v1.0.5
Guides / Usage with Create React App

Usage with Create React App

To get started using Pivotal UI with Create React App (CRA), follow these steps:

  1. Install the latest version of Node LTS. See here for instructions.

  2. Create a new CRA project with this command:

npx create-react-app some-directory

At this point, you'll be able to start up the default CRA app locally:

cd some-directory
yarn start

For more information on Create React App, see the CRA readme.

  1. Install the pivotal-ui node module:
yarn add pivotal-ui
  1. Open src/App.js and replace the contents with:
import React, {Component} from 'react';
import {DefaultButton} from 'pivotal-ui/react/buttons';

export default class App extends Component {
  render() {
    return <DefaultButton>Click Me</DefaultButton>
  }
}

Sass

Please refer to the create-react-app docs