What is an IFrame?
The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one. You can read more about IFrames here.
Where can I use the component?
Since the web component is an 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
Constructing the IFrame Link
The IFrame is powered by an Explo URL that will need to be constructed.Use an Embed Secret (Recommended)
https://app.explo.co/iframe/<jwt>/<environment>
Use a Dashboard Id and Customer Token
https://app.explo.co/iframe/<dashboard_id>/<customer_token>/<environment>
URL Attributes
All strings must be quoted with double quotes "".Embedding the IFrame Link
Embed the IFrame below into your web application. The IFrame is backward-compatible with the previous Dashboard Customer Token syntax, but we recommend using the Embed Secret (JWT) syntax. Read more about embed secrets here.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 url of your embed like so:Date Range Picker Elements
You can set the following values on date range picker elements:- Start date
- End date
- Min date
- Max date
Event-Based Updates
You are also able to pass events to the Explo IFrame without reloading the entire dashboard. Below is an example of passing a hide element event to an IFrame component. See here for more information on Custom JS Events.Turning on Copy-Paste for Data Table Cells
To turn on copy-paste (Ctrl+C & Ctrl+V) for data table cells, you need to add an additional prop to the IFrame. You need to addallow="clipboard-write", like this: