IFrame
An embedded web page that supports permissions to allow or deny downloads, form submissions, microphone and camera access, and popups.
Use a HTML component to include custom HTML and CSS instead of an embedded web page. You can also use a Custom Component to include custom React, HTML, and JavaScript.
Properties
Available properties for IFrame with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
Whether to allow camera use via getUserMedia()
.
Whether to allow file downloads.
Whether to allow form submissions.
Whether to allow fullscreen display via requestFullScreen()
.
Whether to allow geolocation use via getCurrentPosition()
and watchPosition()
.
Whether to allow microphone use via getUserMedia()
.
Whether to allow modals via window.print()
, alert()
, confirm()
, and prompt()
.
Whether to allow payments via PaymentRequest()
.
Whether to allow popups via window.open()
and target="_blank"
.
Whether to allow the use of browser storage, such as LocalStorage and cookies, by enabling allow-same-origin
on the frame. Refer to the MDN iframe documentation for more information.
Set the SANDBOX_DOMAIN and ALLOW_SAME_ORIGIN_OPTION env variables to enable this option. Visit the environment variable documentation for more information.
Whether to allow links and code to navigate to away from the current app.
Whether the component is visible.
Whether the component takes up space on the canvas if hidden
is true
.
The amount of margin to render outside of the component.
Whether the component remains visible in the editor if hidden
is true
.
Whether to display a top bar that contains user actions and title
, if set.
The source URL.
The title to display in the top bar when showTopBar
is true
.
The text to display in a tooltip on hover or focus.
Methods
Methods for interacting with IFrame. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Set the src
value to specify the URL to use.
Reload the iframe
.