Hub Components
Web components for embedding Hub into websites and custom applications.
Using these components
Script tag
Add <script src='https://unpkg.com/@esri/radar@0.0.5/dist/radar.js'></script>
in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
React App
To use Hub components in a React application, see Stencil.js docs on React
Ember App
To use Hub components in an Ember application, use ember-cli-stencil
- Run
ember install ember-cli-stencil ember-auto-import
- Run
npm install @esri/radar --save
In a stencil-starter app
- Run
npm install hub-radar --save
- Add an import to the npm packages
import hub-radar;
- Then you can use the element anywhere in your template, JSX, html etc
Development
npm install
npm start
Add new components
To build a new component:
npx stencil g
Please preface all component files with hub-
and component modules with Hub
for example hub-map.tsx
annd HubMap
Storybook
To view the components in an explorable player:
npm run storybook
Deploy
To build the component for production, run:
npm run build
To publish storybook to GitHub pages
npm run deploy-storybook
Test
To run the unit tests for the components, run:
npm test
Need help? Check out our docs here.