
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@native-html/iframe-plugin
Advanced tools
🌐 A WebView-based plugin to render iframes in react-native-render-html
:warning: This documentation is for react-native-render-html v6 (@native-html/iframe-plugin@2.x). For v5, go here.
🌐 A WebView-based plugin to render iframes in react-native-render-html.
Install:
:warning: With expo, use
expo installinstead to grab a compatiblereact-native-webviewversion.
npm add --save @native-html/iframe-plugin react-native-webview
yarn add @native-html/iframe-plugin react-native-webview
Features:
onLinkPress;defaultWebViewProps;react-native-web via @formidable-webview/webKnown Limitations:
react-native-web, onLinkPress will not work for external domains.| react-native-render-html | @native-html/iframe-plugin |
|---|---|
| ≥ 5.0.0 < 6.0.0 | 1.x (documentation) |
| ≥ 6.0.0 | 2.x (documentation |
import IframeRenderer, { iframeModel } from '@native-html/iframe-plugin';
import RenderHTML from 'react-native-render-html';
import WebView from 'react-native-webview';
const renderers = {
iframe: IframeRenderer
}
const customHTMLElementModels = {
iframe: iframeModel
}
// ...
<RenderHTML renderers={renderers}
WebView={WebView}
source={{ html: '<iframe ...></iframe>' }}
customHTMLElementModels={customHTMLElementModels}
defaultWebViewProps={{ /* Any prop you want to pass to all WebViews */ }}
renderersProps={{ iframe: { scalesPageToFit: true, webViewProps: { /* Any prop you want to pass to iframe WebViews */ } }}}
/>
To customize the behavior of this renderer, you can pass a config object
to the renderersProps.iframe prop of RenderHTML component.
See the documentation for this object here: IframeConfig.
When scalesPageToFit is set to true, if the iframe width (as determined by the
width element attribute) is greater than the available width (as determined
by HTML props contentWidth and computeEmbeddedMaxWidth), the WebView will
be zoomed out by just the right amount to have no horizontal cropping. This is
equivalent to resizeMode: 'contain' for images. See example below with
scalesPageToFit enabled (left) and disabled (right):

You can customize the renderer logic thanks to useHtmlIframeProps hook, iframeModel and HTMLIframe exports:
import {useHtmlIframeProps, HTMLIframe, iframeModel} from '@native-html/iframe-plugin';
const IframeRenderer = function IframeRenderer(props) {
const iframeProps = useHtmlIframeProps(props);
// Do customize the props here; wrap with your own container...
return iframeProps ? <HTMLIframe {..iframeProps} /> : null;
};
const renderers = {
iframe: IframeRenderer
}
// use "renderers" prop in your RenderHTML instance
Documentation for all exports of this library is available here.
FAQs
🌐 A WebView-based plugin to render iframes in react-native-render-html
The npm package @native-html/iframe-plugin receives a total of 8,668 weekly downloads. As such, @native-html/iframe-plugin popularity was classified as popular.
We found that @native-html/iframe-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.