You can use the @carbon/themes
package as a replacement for carbon-themes
.
This package will provide all themes and color groups for the new version of the
IBM Design Language and Carbon v10.
You can use @carbon/themes
by including the files in Sass, or JavaScript. For
full usage information, checkout the project
README.md
file.
To include a theme in your Sass, you can write the following in your file:
@import '@carbon/themes/scss/themes';
By default this will load in the white
color group in your theme. If you are
looking for a specific color group can import them directly by writing the
following:
@import '@carbon/themes/scss/g10';
@include carbon--theme-g10();
You can repeat this for any of the color groups, for example white
, g10
,
g90
, and g100
.
The carbon-themes
package has been deprecated, instead you should use the
@carbon/themes
package.
Below is a list of all the themes
files that existed in v9 and their
replacement in the newest version.
v9 | v10 |
---|---|
themes/carbon.scss |
Replaced by the white color group |
themes/dark-ui.scss |
Replaced by the g90 color group |
themes/experimental--light.scss |
Replaced by the white color group |
themes/genesis.scss |
Removed |
themes/watson.scss |
Removed |