Components

Iframe

A component to render external content via an iframe.

Usage

The IFrame component is utilized to embed another HTML page into the current one.

::iframe
---
src: "https://konghq.com"
border: "1px solid lightgray"
border-radius: "8px"
height: "600px"
width: "600px"
max-width: "100%"
padding: "0"
margin: "0"
display: "inline"
---
::
Iframe Component Props

The URL of the page to embed.

The border of the element. Accepts string | null.

The border radius of the element. Accepts string | null.

The height of the element. Accepts string | null.

The width of the element. Accepts string | null.

The max width of the element. Accepts string.

The padding of the component. Accepts string | null.

The margin of the component. Accepts string | null.

The display type of the component. Accepts the CSS values for 'display'.

Props

The IFrame component accepts any attribute allowed by the native iframe element, other than srcdoc, including global attributes.

src

The URL of the page to embed. If the src prop is not provided, the element will be removed from the DOM.

  • Type: string
  • Default: ''
  • Required: true

Shared Props

This component also includes the shared props listed below:

  • padding - default is null
  • margin - default is null
  • border - default is null
  • borderRadius - default is null
  • width - default is 100%
  • height - default is 100%
  • maxWidth - default is 100%
  • display - default is inline
  • styles - default is ''

See here for more information on shared props.