A collection of IBM.com components and patterns implemented using React and Carbon.
Run the following command using npm:
npm i @carbon/ibmdotcom-react
If you prefer Yarn, use the following command instead:
yarn add @carbon/ibmdotcom-react
NOTE: Carbon dependencies will be managed by Carbon for IBM.com starting in
v1.3.0
. For earlier versions, Carbon dependencies will have to be installed separately:yarn add carbon-components carbon-components-react carbon-icons
-
These components require the use of Webpack in your project. See our
webpack.config.js
for an example configuration. -
Components do not import any of the styles themselves, use the scss or css from
@carbon/ibmdotcom-styles
to bring in styling.
Styles are in a separate package entirely, as they are considered to be framework agnostic and can be used with any framework. Learn how to include styles here.
View available React Components here. You can see usage information in several ways:
- Clicking the DOCS tab in the top of the selected component. You can see the list of available React props as well as how to use in your project.
- Clicking the STORY tab at the bottom. This tab contains the code that shows how the component is being used
- Clicking the KNOBS tab at the bottom and changing values there. Most
knobs are shown as something like
Button kind (kind)
, wherekind
is the name of React prop - Clicking the CARBON THEME tab at the bottom and interacting with the selected component. You can see what the component looks like in the four available Carbon themes (NOTE: not all components are available in all themes).
- See our documentation site here for full how-to docs and guidelines
- Contributing: Guidelines for making contributions to this repo.
We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our Contributing Guide and our Developer Guide! 👀
Licensed under the Apache 2.0 License.
This package uses IBM Telemetry to collect metrics data. By installing this package as a dependency you are agreeing to telemetry collection. To opt out, see Opting out of IBM Telemetry data collection. For more information on the data being collected, please see the IBM Telemetry documentation.