Skip to main content

Step 1: Import Explo JS library

Add Explo’s script tag to the <head> of your index.html
index.html

Step 2. Embed the web component

What is the web component?

The Explo web component is a custom HTML element. This means that it functions as a native HTML element and can be used in any web development context. You can read more about custom HTML elements here.

Where can I use the component?

Since the web component is a custom HTML element, you can use it in any context:
  • Directly in an HTML file
  • Define it in vanilla JS
  • Any JS web framework: React, Vue, Angular, etc

Embedding the component

The embed component takes in a few different properties. The component is backward-compatible with the previous V1 syntax and V0 syntax, but we recommend using the V2 (embed secret) syntax. Read more about embed secrets here.

Component Attributes

Typescript Type Definition

If you are using TypeScript, define the embedded component within the global namespace. This needs to be defined at the top of each TypeScript file that uses the explo-dashboard component. You may need to exclude this block from your lint rules (e.g. @typescript-eslint/no-namespace)

Passing in Variables

You can see how to do that here.

Hide Elements

You can hide elements on your dashboard by passing a hide parameter into the variables of your embed like so:

Exclude Dates

You can also restrict the available dates on a dashboard by passing in a min and max date to each date picker element in the variable section like so:

Event-Based Updates

You are also able to pass events to the Explo web component without reloading the entire dashboard. Below is an example of passing a hide element event to a web component. See here for more information on Custom JS Events.