Skip to content

Getting started

This library allows you to automatically resize iframes based on their content sizes. It prevents scrollbars from appearing in your iframe and enhances the user experience.

<script type="module">
import { initialize } from "https://cdn.jsdelivr.net/npm/@open-iframe-resizer/core@v2.4.0/dist/index.min.js";
initialize({}, "#my-iframe");
</script>

You need to call the initialize function in the page that host the iframe(s) you want to resize:

Note you can also install the core package through your favorite package tool:

Terminal window
npm install @open-iframe-resizer/core