This library enables the simple automatic resizing of the height and width of both same and cross domain iframes to fit their contained content and provides a range of features to address the most common issues with using iframes.
Setup and API guide
Please see the iframe-resizer website for setup guides and API documentation.
Main packages
For version 5 iframe-resizer is split into two main packages to make it simpler to deploy across different domains and better support tree shaking.
@iframe-resizer/parent
The parent page package sets up an iframe for automatic content resizing. Their are versions of this package for several popular libraries and frameworks (see below).
@iframe-resizer/child
This package needs loading into the iframe, where it will quietly wait for a message from the parent page before initialising. It is designed to be a good guest on someone else site.
Frameworks and Libraries
In addition to the two main packages, their are versions of the parent package for the following platforms.
@iframe-resizer/react
A React component for the parent page.
@iframe-resizer/vue
Coming soon.
@iframe-resizer/jquery
A simple jQuery wrapper for the parent page.
Platform Guides
Guides for using iframe-resizer on different web development platforms.
Wordpress
Google Apps Script
Framework API
Their is also an API to support the creation of additional custom components.
Copyright © 2013-24 David J. Bradshaw -Licensed under the GPL V3