Skeleton Loader For Iframe – React Loading Iframe

The React Loading Iframe component that shows a skeleton loader in an iframe element until the src page responds.

How to use it:

1. Install and import the component.

# Yarn
$ yarn add react-loading-iframe

# NPM
$ npm i react-loading-iframe
import LoadingIframe from 'react-loading-iframe';

2. Add an iframe into your app using the LoadingIframe instead.

const Skeleton = () => {
  return <div>Loading Screen</div>;
};
export const BasicExample = () => {
  return (
    <LoadingIframe
      skeleton={<Skeleton />}
      src="https://google.com"
      className="your-class"
      frameBorder={0}
    />
  );
};

Preview:

Skeleton Loader For Iframe - React Loading Iframe

Download Details:

Author: tea-lover-418

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/tea-lover-418/react-loading-iframe

License: MIT

Add Comment