Skip to main content

IFrame

IFrame control allows embedding an HTML page into the current one.

Examples​

import pglet
from pglet import IFrame

page = pglet.page()
page.add(IFrame(src="https://pglet.io"))

Properties​

NameTypeDefaultDescription
srcstringThe URL of the page to embed.
titlestringAllows labeling content inside the IFrame for people navigating with assistive technology such as a screen reader.
borderWidthstringBorder width in pixels around control, e.g. 1. Multiple values separated with spaces can be provided to set border width for each of the sides: top right bottom left, e.g. 2 0 2 0.
borderColorstringBorder color around control. Multiple values separated with spaces can be provided to set border color for each of the sides: top right bottom left, e.g. yellow green blue gray.
borderStylestringBorder style around control: none (default), dotted, dashed, solid, double, groove, ridge, inset, outset. Multiple values separated with spaces can be provided to set border style for each of the sides: top right bottom left, e.g. solid none none none.
borderRadiusstringBorder radius in pixels around control, e.g. 5. Multiple values separated with spaces can be provided to set border style for each of the sides: top right bottom left, e.g. 10 10 0 0.