![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
react-loading-iframe
Advanced tools
Show a skeleton on a loading iframe to smooth over the UX. Iframes can take a while to respond, and until they do your users see a blank screen. Using react-loading-iframe you can set a nice skeleton until the src page responds.
Show a skeleton on a loading iframe to smooth over the UX. Iframes can take a while to respond, and until they do your users see a blank screen. Using react-loading-iframe you can set a nice skeleton until the src page responds.
Install with npm or yarn!
npm i react-loading-iframe
yarn add react-loading-iframe
Include in your project. Pass a skeleton as prop to LoadingIframe, and it will be rendered until the iframe is ready.
import LoadingIframe from 'react-loading-iframe';
const Skeleton = () => {
return <div>Cool loading screen</div>;
};
export const BasicExample = () => {
return (
<LoadingIframe
skeleton={<Skeleton />}
src="https://google.com"
className="your-class"
frameBorder={0}
/>
);
};
LoadingIframe carries over all props from HTML iframes, except style
as it is used internally.
Additional props:
skeleton
: ReactElement. When missing this will throw a console warning as you would be better off using a regular iframe.Contributions are open.
In the future I'd like to add a functionality where you can search the element tree of an iframe for an element and optionally show a different skeleton if an element is not found. This can be used to overwrite loading screens inside of an iframe. If you have any suggestions or possible implementations please share them!
FAQs
Show a skeleton on a loading iframe to smooth over the UX. Iframes can take a while to respond, and until they do your users see a blank screen. Using react-loading-iframe you can set a nice skeleton until the src page responds.
The npm package react-loading-iframe receives a total of 0 weekly downloads. As such, react-loading-iframe popularity was classified as not popular.
We found that react-loading-iframe 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.