easherma / react-youtube-background

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-youtube-background

A React component that uses a Youtube video as background for a container.

Installation

$ npm install react-youtube-background

Usage

Import the component

import YoutubeBackground from 'react-youtube-background'

Use the component in you render function

<YoutubeBackground 
  videoId={string}     // default -> "jssO8-5qmag"
  aspectRatio={string} // default -> "16:9"
  overlay={string}       // defaults -> null | e.g. "rgba(0,0,0,.4)"
  className={string}   // defaults -> null
  onReady={func}       // defaults -> null
  
>
  {/* YOUR CONTENT */}
</YoutubeBackground>

About


Languages

Language:JavaScript 89.2%Language:CSS 10.8%