Skip to content

The @arcgis/common-components package contains shared UI components used by higher-level components in the ArcGIS Maps SDK for JavaScript . It includes the Slider, Histogram, and Ticks components.

Get started

You can include this package in your application using either the ArcGIS CDN or by installing from npm. Visit the full Get Started guide for working with the ArcGIS CDN, npm, CSS, frameworks and more.

CDN

Include the library in the <head> section of your HTML:

<!-- Load the ArcGIS Maps SDK for JavaScript from CDN -->
<script type="module" src="https://js.arcgis.com/5.0/"></script>

This only needs to be done once in your application. No specific import is needed to use a component.

npm

Run the following command to install the package:

npm install @arcgis/common-components

Afterwards, you’ll need to individually import each component you use.

import "@arcgis/common-components/components/arcgis-slider";
import "@arcgis/common-components/components/arcgis-histogram";