UNPKG

@open-iframe-resizer/react

Version:

Open-source modern iframe resizer component

33 lines (21 loc) 716 B
# Open Iframe Resizer React ## Overview `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! ## Getting Started Install the package: ```bash npm install @open-iframe-resizer/react ``` Wrap your iframes with it to resize them automatically: ```jsx import { IframeResizer } from "@open-iframe-resizer/react"; function YourComponent() { return ( <div> <IframeResizer src="https://github.com" /> </div> ); } ``` You can found a working example [here](https://codesandbox.io/p/devbox/unruffled-curie-wpxgrd)