Iframe

<div class="alert alert-warning"> 📢 Don't fork this project. Use, contribute, or open issues using your feature request. </div>

image

An app that makes it possible to render external iframes on a store

Configuration

  1. Add the vtex.iframe to the theme's dependencies on the manifest.json
...
"dependencies": {
 ...
 "vtex.iframe": "0.x"
 ...
}
...
  1. Add the interface iframe to any custom page (Iframes are not allowed outside custom pages).

    ...
    "store.custom#about-us": {
       "blocks": [
         "flex-layout.row#about-us",
         "iframe"
       ]
     },
    
    "iframe": {
      "props": {
        "src": ""
      }
    },
    ...
Prop nameTypeDescriptionDefault value
srcStringSource address the iframe should rendernull
widthNumberWidth attribute of the iframenull
heightNumberHeight attribute of the iframenull

Customization

There is a .container handle that wraps the iframe, it's also possible to use blockClass