🤩
Windframe Import Update is finally here.

Iframe

Angular Bootstrap Iframe

Angular Bootstrap IFrame is used to embed another document within the current HTML document.

The Contrast Angular Bootstrap Iframe, like every other Contrast React Bootstrap Components, is very responsive. The CDBIframe has callback props that enable us to fire functions at various events making it more interactive.

Importing the Contrast Angular Bootstrap Iframe Module

To use the Contrast Angular Bootstrap Iframe component in your project you need to import IframeModule.

typescript
import {IframeModule } from 'cdbangular';

Default Iframe

Angular Bootstrap Iframe Default

html
html
<CDBIframe src="https://www.youtube.com/embed/xnczyP2jSR0"/>

Contrast Angular Bootstrap Iframe Props

This section will build on your information about the props you get to use with the Contrast Angular Bootstrap Iframe component. You will find out what these props do, their default values, and how you would use them in your code.

The table below lists other prop options of the CDBIframe component.

NameTypeDefaultDescriptionExample
classStringAdds custom classesclass="myClass"
urlStringRequired. The iframe urlurl="https://www.youtube.com/embed/xnczyP2jSR0"
allowFullScreenBooleanfalseIf set, applies the allowFullScreen paramallowFullScreen=true
heightNumberDefines component heightheight=300
widthNumberDefines component widthwidth=300
idStringAdds id to the elementid="my_id"
nameStringAdds name attributename="myIframe"
onLoadfunctionFunction fired on onLoad eventonLoad={handleLoad}
onMouseOutfunctionFunction fired on onMouseOut eventonMouseOut={handleEvent}
onMouseOverfunctionFunction fired on onMouseOver eventonMouseOver={handleEvent}
ratioStringDefines component ratio. Choose from "1by1", "4by3", "16by9" and "21by9"ratio="1by1"
sandboxStringAdds optional sandbox values: (no value) - Applies all restrictions, allow-forms - Allows form submission, allow-modals Allows to open modal windows, allow-orientation-lock Allows to lock the screen orientation, allow-pointer-lock Allows to use the Pointer Lock API, allow-popups Allows popups, allow-popups-to-escape-sandbox Allows popups to open new windows without inheriting the sandboxing, allow-presentation Allows to start a presentation session, allow-same-origin Allows the iframe content to be treated as being from the same origin, allow-scripts Allows to run scripts, allow-top-navigation Allows the iframe content to navigate its top-level browsing context, allow-top-navigation-by-user-activation Allows the iframe content to navigate its top-level browsing context, but only if initiated by usersandbox=true
titleStringDefines component titletitle="my_title"
styleObjectAdd's additional styles.style={color: 'red'}

Trying to build out all user interfaces and components for your website or web app from scratch can become a very tedious task. A huge reason why we created Contrast Bootstrap to help reduce the amount of time we spend doing that, so we can focus on building some other aspects of the project. Contrast Bootstrap PRO consists of a UI Kit featuring over 10000+ component variants. Together with a template of 5 admin dashboards and 23+ additional multipurpose pages template for building almost any type of website or web app. You can view a demo and learn more about Contrast by clicking here.Download the free react template

ad-banner

Contrast Bootstrap PRO was built using the most popular CSS framework Bootstrap to help build your next landing, admin SAAS, prelaunch etc project with a clean, prebuilt and well documented template and UI components.Learn more about Contrast