You can find documentation and examples on our docs page.
Add BigDesign and styled-components@5 to your project using npm
:
npm install @bigcommerce/big-design styled-components@5
or with pnpm
:
pnpm add @bigcommerce/big-design styled-components@5
Add the font as a <link>
in your index.html
/<head>
element.
<head>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="" />
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600&display=swap" rel="stylesheet" />
</head>
Import the GlobalStyles
component and use it once in your app. This will set a few styles globally
and add normalize.css. We recommend placing it close to
your root component. Then import any component, such as Button
, to use it anywhere in your app.
import { Button, GlobalStyles } from '@bigcommerce/big-design';
...
<App>
<GlobalStyles />
<Button>Click me</Button>
</App>
This is a monorepo that uses Lerna and pnpm Workspaces.
Workspaces are inside the packages directory.
- big-design: React component library.
- big-design-theme: Default Theme.
- big-design-icons: Icons library.
- docs: Documentation live here.
- configs: (internal) Shared configs between packages.
As this is a monorepo, each package has it's own Changelog. Links for each can be found below
To contribute, please read our Contributing guidelines and Code of Conduct first.
Running the following commands will run big-design
and docs
in watch mode.
pnpm
pnpm run build:icons
pnpm run start
Run tests with:
pnpm run test
Update snapshots with:
pnpm build
cd packages/big-design
pnpm run test --update-snapshot
Run linter with:
pnpm run lint
This is for releasing new versions of all the packages.
GH_TOKEN=<token> pnpm lerna publish <patch/minor/major> --sign-git-commit --sign-git-tag --create-release github --git-remote upstream
GH_TOKEN=<token> pnpm lerna publish prerelease --pre-dist-tag next --conventional-prerelease --sign-git-commit --sign-git-tag --create-release github --git-remote upstream
To promote a prerelease add the --conventional-graduate
flag to release command.
GH_TOKEN=<token> pnpm lerna publish <patch/minor/major> --conventional-graduate --sign-git-commit --sign-git-tag --create-release github --git-remote upstream
from-package
allows you to release what's on upstream/main
if the publish script failed. By default the lerna publish
command will push commits and tags before running through the build. This is a just-in-case command.
GH_TOKEN=<token> pnpm lerna publish from-package --git-remote upstream
pnpm run build
cd packages/docs
pnpm run deploy --remote upstream
Big Design is licensed under MIT and CC BY 3.0. See LICENSE.md for more details.