React components for icons in digital and software products using the Carbon Design System
To install @carbon/icons-react
in your project, you will need to run the
following command using npm:
npm install -S @carbon/icons-react
If you prefer Yarn, use the following command instead:
yarn add @carbon/icons-react
Icons in this package support the following sizes: 16
, 20
, 24
, and 32
pixels. These sizes refer to the width and height of the icon. You can import an
icon component into your project by doing one of the following:
import Add24 from '@carbon/icons-react/es/add/16';
We also provide CommonJS and UMD files in the lib
and umd
directories,
respectively.
To import using CommonJS, you can do the following:
const Add24 = require('@carbon/icons-react/lib/Add/24');
Note: if you would like to find the import path for an icon, you can reference our icon preview
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 ! 👀
Licensed under the Apache 2.0 License.