Calcite Design Tokens
Getting Started
Install the design tokens module:
pnpm add @esri/calcite-design-tokens
Reference tokens in your CSS:
@import "@esri/calcite-design-tokens/dist/css/index.css";
:root {
--my-custom-token: var(--calcite-color-brand);
}
Importing tokens
These are the key published asset files generated by the token transformer:
| Name | Contents | CSS | SCSS |
|---|---|---|---|
| semantic | base semantic tokens, including border, corner-radius, font, opacity, shadow, size, space, and z-index | @esri/calcite-design-tokens/dist/css/semantic.css | @esri/calcite-design-tokens/dist/scss/semantic.scss |
| light (deprecated) | semantic color tokens - light-mode | @esri/calcite-design-tokens/dist/css/light.css | @esri/calcite-design-tokens/dist/scss/light.scss |
| dark (deprecated) | semantic color tokens - dark-mode | @esri/calcite-design-tokens/dist/css/dark.css | @esri/calcite-design-tokens/dist/scss/dark.scss |
| light-dark | semantic color tokens - light-dark-mode | @esri/calcite-design-tokens/dist/css/light-dark.css | @esri/calcite-design-tokens/dist/scss/light-dark.scss |
| classes/mixins | semantic typography classes | @esri/calcite-design-tokens/dist/css/classes.css | @esri/calcite-design-tokens/dist/scss/mixins.scss |
| index | base semantic tokens including color and typography | @esri/calcite-design-tokens/dist/css/index.css | @esri/calcite-design-tokens/dist/scss/index.scss |
| breakpoints | semantic breakpoint tokens | @esri/calcite-design-tokens/dist/css/breakpoints.css | @esri/calcite-design-tokens/dist/scss/breakpoints.scss |
License
COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt
All rights reserved under the copyright laws of the United States and applicable international laws, treaties, and conventions.
This material is licensed for use under the Esri Master License Agreement (MLA), and is bound by the terms of that agreement. You may redistribute and use this code without modification, provided you adhere to the terms of the MLA and include this copyright notice.
See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
For additional information, refer to Calcite's licensing and contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA
email: contracts@esri.com