Getting Started with React
Follow these instructions to use Hover Design System components (📦 @hover/blueprint) in a React application.
Installation
NPM Authentication
All system packages are currently distributed as private packages on npm. Therefore, before we can install @hover/blueprint, we need to configure npm to authenticate to the correct package registries.
-
Create an
.npmrc
with the following commandnpx @hover/configure-npm -s hover -
Copy the requested secrets from 1Password as prompted
Install Hover Design System and its dependencies
-
Verify you have React version
16.8
or greater installed -
Install @hover/blueprint and its
peerDependencies
yarn add @hover/blueprint @emotion/react@^11 @emotion/styled@^11 framer-motion@^8
Usage
Set up DesignSystemProvider
Any components must be wrapped in a DesignSystemProvider
to work correctly. We
recommend wrapping your entire application with DesignSystemProvider
.
This may differ depending on how your application is set up, but generally it should look like this:
Next.js
In a Next.js application, you can use a
custom App
.
Customize Theme (optional)
-
Create a custom theme file
-
Override built-in theme by passing
customTheme
toDesignSystemProvider