Iframe

Available as: Web ComponentShortcodeOxygen Element

A wrapper around a standard iframe element, which scales proportionally to its parent. Great for showing desktop versions of a website on smaller screens or viewports.

<spx-iframe src="https://fabrikat.local/spx" size="1920px"> </spx-iframe>

Properties

fit

Type: boolean

Automatically resize iframe to fit content.

lazy

Type: boolean

Lazy load content.

loader-background

Type: stringDefault: var(--spx-color-gray-900)CSS Variable: --spx-iframe-loader-background

loader-border-radius

Type: stringDefault: var(--spx-border-radius)CSS Variable: --spx-iframe-loader-border-radius

loader-color

Type: stringDefault: #ffffffCSS Variable: --spx-iframe-loader-color

loader-padding

Type: stringDefault: 0.8emCSS Variable: --spx-iframe-loader-padding

min-height

Type: stringDefault: 400pxCSS Variable: --spx-iframe-min-height

size

Type: stringDefault: 1440px

Screen size of the site shown inside the iframe.

src

Type: stringDefault: https://spx.dev

Source for the iframe.

Events

spxIframeDidLoad

Fires after component has loaded.