Awesome Open Source
Awesome Open Source

Built With Stencil npm Build

Calcite Components

Shared Web Components for Esri's Calcite Design Systems. To see the components in action, view the documentation.

Sketch library

All of the Calcite Components are available in the calcite-sketch-library with all variations and sizes.


The simplest way to set up the components in your project is to add the following tags in the head of your HTML document:

  src="[email protected]/dist/calcite/calcite.esm.js"
  href="[email protected]/dist/calcite/calcite.css"

Once these tags are added, components can be used just like any other HTML element. Only components that are actually used will be loaded.

You can also install the components locally with NPM and update the script URLs to reference same files under node_modules.

npm install --save @esri/calcite-components


If you already have a webpack build for your project, you can use @stencil/webpack to add calcite-components to your bundle.

After installing calcite-components, install the plugin as a dev dependency:

npm install --save-dev @stencil/webpack

Then import and call the plugin in webpack.config.js:

const stencil = require('@stencil/webpack');
module.exports = {
  plugins: [
    new stencil.StencilPlugin()

Lastly, add the import in your main bundle js (or ts) file:

import "@esri/calcite-components/dist/calcite.js";

This will add the initial stencil loader to your bundle, and copy over the actual component code to the output directory you've configured for Webpack. Components will still be lazy-loaded as they are needed. Note: you must use the .js file path for the Webpack plugin to work correctly, even if your bundle file is a TypeScript file.


Stencil provides a full set of typings for all the components in this repo. To make TypeScript aware of these components, just import the library:

import "@esri/calcite-components";

This will provide autocomplete of component names/properties, as well as additional HTML element types:

// created elements will implicitly have the correct type already
const loader = document.createElement("calcite-loader");
loader.isActive = true;

// you can also explicitly type an element using the generated types
// the type name will always be formatted like HTML{CamelCaseComponentName}Element
const loader = document.querySelector(".my-loader-element") as HTMLCalciteLoaderElement;
loader.isActive = true;

TypeScript with Preact

For preact applications using TypeScript, you must add an additional file to your tsconfig.json:

"files": [

This allows you to use custom tags and provides auto-complete for calcite-components. See the Preact + TypeScript example for more details.

Browser Support

Google Chrome


Mozilla Firefox




Microsoft Edge


Last 2 versions


We welcome contributions to this project. See for an overview of contribution guidelines.



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

For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA

email: [email protected]

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Javascript (1,556,467
Typescript (254,312
Js (9,615
Ui (5,295
Component (4,507
Webcomponents (2,118
Design Patterns (1,955
Design System (1,011
Custom Elements (597
Stenciljs (244
Esri (183
Related Projects