$ npm install --save carbon-components-react carbon-components carbon-icons
If you prefer Yarn, use the following command instead:
$ yarn add carbon-components-react carbon-components carbon-icons
Components do not import any of the styles themselves, use the SCSS or CSS from
carbon-componentsto bring in styling. You can also use the
unpkgCDN to bring in the styles wholesale -
unpkg.com/carbon-components/css/carbon-components.cssaliases the latest CSS file.
For older browsers (e.g. IE11), polyfills listed in the carbon-components-react/.storybook/polyfills.js file are required.
If you just want to try out
carbon-components-react, you can also use CodeSandbox.
Please refer to the Contribution Guidelines before starting any work.
Using the server
We recommend the use of React Storybook for developing components.
- Start the server:
$ yarn storybook
Open browser to
Develop components in their respective folders (
Write stories for your components in
List of available components
View available React Components here. Usage information is available when you click the blue ? icon in the top right corner of the selected component.
If you experience any issues while getting set up with Carbon Components React, please head over to the GitHub repo for more guidelines and support. Please create an issue if your issue does not already exist.