Home

Awesome

<p align="center"> <h1 align="center">Carbon Components Angular</h1> <p align="center"> An Angular implementation of the Carbon Design System <br /><br /> <a href="https://github.com/carbon-design-system/carbon-components-angular/actions/workflows/publish.yml"> <img src="https://github.com/carbon-design-system/carbon-components-angular/actions/workflows/publish.yml/badge.svg" /> </a> <a href="https://www.npmjs.com/package/carbon-components-angular"> <img src="https://img.shields.io/npm/v/carbon-components-angular.svg" /> </a> <img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg"> <a href="https://www.netlify.com" target="_blank"> <img src="https://www.netlify.com/img/global/badges/netlify-color-accent.svg"/> </a> <a href="https://bestpractices.coreinfrastructure.org/projects/5887"> <img src="https://bestpractices.coreinfrastructure.org/projects/5887/badge"> </a> <a href="https://discord.gg/J7JEUEkTRX"> <img src="https://img.shields.io/discord/689212587170201628?color=5865F2" alt="Chat with us on Discord"> </a> </p> </p>

Getting started

Assuming we're starting with a new @angular/cli project:

$ npx @angular/cli new my-project --style=scss
$ cd my-project
$ npm i --save carbon-components-angular @carbon/styles

Then we need to include carbon-components in src/styles.scss:

@use "@carbon/styles";

Note: For offline usage we'll need to set $font-path: '~carbon-components/src/globals/fonts'; at the very top of our src/styles.scss. This will copy the fonts to our dist folder upon successful build. If you like the fonts to be a part of your assets folder and not pollute the dist folder then copy the fonts from node_modules/carbon-components/src/globals/fonts into our app's src/assets/fonts folder and add $font-path: '/assets/fonts/'; at the very top of our src/styles.scss.

That's it! Now we can run npm start and start building out our application!

Note: This isn't the only way to bootstrap a carbon-components-angular application, but the combination of @angular/cli and the carbon-components scss is our recommended setup.

Edit Carbon Components Angular

Support

Angular version support matrix:

Angularv3v4v5
6
7
8
9
10
11
12
13
14
15
16
17
18

Carbon Components Angular version support matrix:

Carbon Components Angular versionCommunity supportActive support
v1
v2
v3
v4
v5

Not supported versions: Out of support. We plan to support our latest, and previous release. Beyond that we make no guarantees of continued support - these include v1, v2

How to read this table:

Contributing

IBMers contributing

If you are an IBMer, you must complete the steps at W3 Developer before contributing to any open source projects. See our contributing guidelines for more details.

Quickstart

Pull request guidelines

Issues submission guidelines

npm commands

To keep our build dependencies local we use npm scripts to run our webpack, gulp, and general build tasks. You should never install webpack or gulp globally as that will likely conflict with our version. You should never need to modify the build process to add a component or story.

Resources

Philosophy

Code of Conduct

Read our code of conduct here

<picture><source height="20" width="20" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-dark.svg"><source height="20" width="20" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"><img height="20" width="20" alt="IBM Telemetry" src="https://raw.githubusercontent.com/ibm-telemetry/telemetry-js/main/docs/images/ibm-telemetry-light.svg"></picture> IBM Telemetry

This package uses IBM Telemetry to collect de-identified and anonymized 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.