IFrame
Introduction
The IFrame component embeds another document, such as a webpage, into the current page. This lets you display content from other sources, such as videos, maps, or external websites.
Configuration items
Category |
Configuration |
Example |
Description |
Content |
Pattern |
Configure the IFrame mode |
|
URL |
Sets the address of the document to embed in the IFrame. |
||
Code |
Sets the HTML code snippet to embed in the IFrame. |
||
Interaction |
Hide |
Hides the component. For more information, see Common properties. |
|
Keep layout when hidden |
Keeps the layout space when the component is hidden. For more information, see Common properties. |
||
Style |
Height |
Sets the component height. For more information, see Common properties. |
|
Margin |
Sets the component margin. For more information, see Common properties. |
||
Toolbar |
Shows or hides the toolbar. |
||
Toolbar text |
Sets the text for the toolbar. This option is available only when the toolbar is displayed. |
||
CSS Style |
Background color |
Sets the background color of the IFrame component. For more information, see Common properties. |
|
Border |
Sets the border color of the component. This corresponds to the CSS `border-color` property. For more information, see the MDN documentation. |
||
Border radius |
For more information, see Common properties. |
||
Toolbar background color |
Sets the background color of the toolbar. For more information, see Common properties. |
||
Toolbar text color |
Sets the text color of the toolbar. This corresponds to the CSS `color` property. For more information, see the MDN documentation. |
Properties and methods
Name |
Type |
Example |
Description |
src |
string |
|
IFrame Document URL |
code |
string |
|
The HTML code snippet embedded in the IFrame. |
topBarText |
string |
|
The title text of the toolbar. |
setSrc |
func |
|
Sets the URL of the document in the IFrame. |
clearSrc |
func |
|
Clears the IFrame document URL. |
setCode |
func |
|
Sets the HTML code snippet to embed in the IFrame. |
clearCode |
func |
|
Clears the HTML code snippet embedded in the IFrame. |
setTopBarText |
func |
|
Sets the title text of the toolbar. |
clearTopBarText |
func |
|
Clears the title text of the toolbar. |
click |
func |
|
Click Actions. |