Vega iFrame Component

The Vega iFrame component lets you embed and display HTML content in your Front-End modules. With this component, you can specify iframe dimensions, or apply a custom CSS class. Use this component by entering an external URL address of a page you want to display inside the iframe.

Iframes are susceptible to XSS (cross-site scripting) attacks. Bad actors can perform XSS attacks and change the source site URL, install malware, steal information, or hijack clicks and keystrokes.

To embed Unqork content outside of the Unqork Platform without using iframes, view our Embedded User Interface article.

About the Configuration Window

To learn more about general component settings, view our General Component Settings article.

A static image displaying the iFrame component's Display settings.

Setting

Description

URL

Enter the URL address to display inside of the Iframe component. Embedded URL content larger than the Width and Height field values display scroll bars.

Iframes cannot embed URLs when the X-Frame-Options header is set to DENY.

Width

The horizontal width of the iframe in pixels when displayed in Express View.

If the Width field does not have a value, the default width in Express View is 300px.

Height

The vertical height of the iframe in pixels when displayed in Express View.

If the Height field does not have a value, the default height in Express View is 150px.

Custom CSS Class

Enter a Custom CSS Class to apply to your component. Custom CSS lets you maintain a consistent look and feel when the field or element is part of a template or multiple modules.

Updated CSS styling applies to all components that reference this custom class name.

Hidden

Shows or hides the component from view. Setting the Hidden toggle to  (ON) hides the component in Express View. Setting the toggle to (OFF) shows the component. The component is always visible in the Module Builder.

By default, the Hidden toggle is set to (OFF).

To use an iFrame component, you must have an URL address to implement. For this example, use the following URL address: https://docs.unqork.io/Content/UnqorkHome.htm.

Configure the iFrame Component

1. In the Module Builder, drag and drop an Iframe component onto the canvas.
2. In the Property ID field, enter iframeDocHub.
3. In the URL field, enter https://docs.unqork.io/Content/UnqorkHome.htm.
4. In the Width field, enter 1200.
5. In the Height field, enter 900.
6. Click Save & Close.

Preview your module in Express View. The iFrame component displays the URL in a 1200px by 900px box.

A static image displaying the Express View example of an iFrame component.

Using the example above, execute the Vega Console command UNQENG.tools.getComponentState('iframeDocHub') in the DevTools Console to display the following component data structure:

A static image displaying the data structure of an iFrame component.

Resources