react-lazyload-youtube
v1.0.8
Published
Super lightweight LazyLoad YouTube Videos for faster page load and better performance
Downloads
7,659
Readme
react-lazyload-youtube
Super lightweight LazyLoad YouTube Videos for faster page load and better performance
Install
npm install react-lazyload-youtube
or
yarn add react-lazyload-youtube
Demo
https://ahakem.github.io/react-lazyload-youtube/
Usage
import Youtube from 'react-lazyload-youtube'
import 'react-lazyload-youtube/dist/index.css'
const App = () => {
return <Youtube width="640px" height="480px" videoId="mfxQy5A_tHs"/>
}
Props
- Available Props
videoId
- string (Youtube Video ID)width
- string (value inpx
or any unit) defult value : 100%height
- string (value inpx
or any unit) defult value : 400pximgSize
- string (default, hqdefault, mqdefault, sddefault, maxresdefault) defult value : mqdefault
License
MIT © ahakem