Loading repository data…
Loading repository data…
carbon-design-system / repository
A Carbon-powered React and Web Component library for IBM Products
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Carbon for IBM Products is an open source implementation of the closed source IBM Software pattern asset library (PAL). These PAL designs build on the foundation of IBM’s open source Carbon Design System and React implementation to offer components and patterns beyond the typical component library. Carbon for IBM Products was previously known as Carbon for Cloud and Cognitive, and this name can still be encountered in various places and historical logs.
If you’re just getting started and looking to browse our React components, take a look at our Storybook.
All of our source code and documentation, including this readme, can be found on our GitHub repo, which is also the place to open issues if you have a problem or find a defect or would like to request a new feature or change something.
If you have access to the IBM Slack workspaces, join where you can ask questions, report problems, and get help from the team and from other users.
This project consists of a number of component library packages published on npm:
| Package name | Description |
|---|---|
@carbon/ibm-products | A curated set of components and patterns, built on top of Carbon and designed by the Carbon for IBM Products team |
@carbon/ibm-cloud-cognitive-cdai | (v1 only) Legacy and non-curated design implementations used in application integration |
@carbon/ibm-security | (v1 only) Legacy and non-curated design implementations used in security |
The remaining packages are part of our project infrastructure and are not published on npm.
Carbon 11 support is introduced in Carbon for IBM Products https://github.com/carbon-design-system/ibm-products/labels/version%3A%202
| Package name | Carbon package | React version |
|---|---|---|
@carbon/ibm-products | @carbon/react | 18, 17, 16 |
The following packages support Carbon 10 and are considered https://github.com/carbon-design-system/ibm-products/labels/version%3A%201 packages.
| Package name | Carbon package | React version |
|---|---|---|
@carbon/ibm-products @carbon/ibm-cloud-cognitive-cdai @carbon/ibm-security | carbon-components-react carbon-components @carbon/icons-react @carbon/icons @carbon/colors @carbon/elements etc | 17, 16 |
If you’d like to learn more about migrating from Carbon 10 to Carbon 11, please
see the Carbon
v11 migration guide
(which includes codemods via
@carbon/upgrade)
and the Carbon for IBM Products
v2 migration guide.
Using npm: npm install @carbon/ibm-products
If you prefer Yarn: yarn add @carbon/ibm-products
The @carbon/ibm-products package provides several options for importing the
package styles:
// Include all the styles, including Carbon and experimental styles
@use '@carbon/ibm-products/css/index.min.css';
// Include only styles from @carbon/ibm-products
@use '@carbon/ibm-products/css/index-without-carbon.css';
// Include only styles from @carbon/ibm-products, excluding experimental
styles
@use '@carbon/ibm-products/css/index-without-carbon-released-only.css';
// Include all styles from carbon
@use '@carbon/ibm-products/css/index-full-carbon.css';
To include the styles for a specific component:
// Bring in the styles for one component
@use '@carbon/ibm-products/scss/components/AboutModal';
You can also leverage the Carbon for IBM Products styles independently of the React package using the @carbon/ibm-products-styles package.
import { AboutModal } from '@carbon/ibm-products';
const App = () => {
return <AboutModal />;
};
Components are exported with prefixes that indicate their PDLC (Product Development Lifecycle) status:
Stable components (no prefix): Production-ready, fully reviewed
import { PageHeader, SidePanel, Tearsheet } from '@carbon/ibm-products';
Preview components (preview__ prefix): Production-ready, minor API
changes possible
import { preview__Coachmark } from '@carbon/ibm-products';
Preview Candidate components (previewCandidate__ prefix): Feature
complete, undergoing validation
import {
previewCandidate__Toolbar,
previewCandidate__SearchBar,
} from '@carbon/ibm-products';
Using aliases for cleaner code:
import { previewCandidate__Toolbar as Toolbar } from '@carbon/ibm-products';
// Use without prefix in your code
<Toolbar>...</Toolbar>;
Migrating from feature flags: If you're currently using the deprecated
canary feature flag mechanism (pkg.component.*), see the
Canary Migration Guide
for step-by-step instructions on updating your code.
For more information:
This project is made possible by several community members who have invested their precious time to give back to the Carbon community. It will continue to be possible by having those that benefit from the package contribute back to it.
So, do not be shy. We both depend on and appreciate contributors, new and old, who help us fix bugs, build new features, improve our documentation, etc.
This repository is a monorepo and contains multiple packages so be sure to check the relevant package for any package-specific guidance.
Read also our Contributing Guide and Carbon’s Developer Handbook! 👀
Thanks goes to these wonderful people (emoji key):