Skip to main content

Embedded Component

The embedded component allows you to directly integrate the Reveal Widget into your page layout.

Configuration

Initialize the embedded component with the RevealWidget.initEmbed() method:

const embedInstance = RevealWidget.initEmbed({
interviewId: "your-interview-id",
targetSelector: "#reveal-embed-container",
theme: "light",
primaryColor: "#4a90e2",
autoLoad: true,
interviewee: "optional-interviewee-id",
language: "english"
});

Configuration Options

ParameterTypeDefaultDescription
interviewIdStringRequiredThe ID of your Reveal interview
targetSelectorString"#reveal-embed-container"CSS selector for your embed container
themeString"light"Component theme: "light" or "dark"
primaryColorStringCustom primary color (hex/RGB/name)
autoLoadBooleantrueWhether to load content automatically
intervieweeStringIdentifier for the interview participant
languageString"english"Language for the interview session: "english" or "portuguese"

Methods

// Remove the embed from the page
embedInstance.destroy();

// Reload the embed with current configuration
embedInstance.reload();

Examples

Basic Implementation

<div id="reveal-embed-container" style="width: 100%; height: 600px;"></div>

<script>
RevealWidget.initEmbed({
interviewId: "your-interview-id"
});
</script>

Custom Container

<div id="my-reveal-container" style="width: 100%; height: 500px;"></div>

<script>
RevealWidget.initEmbed({
interviewId: "your-interview-id",
targetSelector: "#my-reveal-container",
theme: "dark"
});
</script>