react-lazyload-youtube
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/react-lazyload-youtube package

1.0.8 • Public • Published

react-lazyload-youtube

Super lightweight LazyLoad YouTube Videos for faster page load and better performance

NPM JavaScript Style Guide downloads

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 in px or any unit) defult value : 100%
    • height - string (value in px or any unit) defult value : 400px
    • imgSize - string (default, hqdefault, mqdefault, sddefault, maxresdefault) defult value : mqdefault

License

MIT © ahakem

Readme

Keywords

none

Package Sidebar

Install

npm i react-lazyload-youtube

Weekly Downloads

876

Version

1.0.8

License

MIT

Unpacked Size

10.9 kB

Total Files

7

Last publish

Collaborators

  • ahakim