This component allows you to wrap your entire React application or each component in an iFrame.
npm install @uiw/react-iframereact-iframe
===



This component allows you to wrap your entire React application or each component in an .
š Use Typescript to write, better code hints.
š¦ Zero dependencies.
š Encapsulation based on function components.
š Provides comprehensive code test coverage.
š Complete official document demo preview.
``bash`
npm i @uiw/react-iframe
`jsx mdx:preview
import React from 'react';
import IFrame from '@uiw/react-iframe';
export default function Demo() {
return (
);
}
`
The head prop is a dom node that gets inserted before the children of the frame.
`jsx mdx:preview
import React from 'react';
import IFrame from '@uiw/react-iframe';
const head = (
);
export default function Demo() {
return (
);
}
`
The initialContent props is the initial html injected into frame. It is only injected once, but allows you to insert any html into the frame (e.g. a
tag,