iframe-resizer
is a modern, lightweight library for resizing iframes dynamically. It is shipped under the MIT license, making it usable in commercial projects.
If you found this plugin helpful, please consider starring the repository!
Install the package:
npm install @open-iframe-resizer/react
Wrap your iframes with it to resize them automatically:
import { IframeResizer } from "@open-iframe-resizer/react";
function YourComponent() {
return (
<div>
<IframeResizer src="https://github.com" />
</div>
);
}
You can found a working example here