# react-vid-background

> React video background is a simple react component which create a video background on your web app which is of the size of the whole screen which is editable using its props.

Latest version **0.0.2** (published 2020-11-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-vid-background
pnpm add react-vid-background
yarn add react-vid-background
bun add react-vid-background
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2020-11-10 |
| First published | 2020-11-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | DK |
| Maintainers | deekeh |
| Keywords | react-video-bg, react |

## Links

- npm: https://www.npmjs.com/package/react-vid-background
- Repository: https://github.com/deekeh/react-video-bg
- Homepage: https://github.com/deekeh/react-video-bg#readme
- Issues: https://github.com/deekeh/react-video-bg/issues
- npm.io page: https://npm.io/package/react-vid-background

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2020-11-10
- 0.0.1 — 2020-11-10
- 1.0.2 — 2020-11-09
- 1.0.1 — 2020-11-08
- 1.0.0 — 2020-11-08

## README

# React Video Background

React Video Background is a simple component of ReactJS which adds a full-screen video background to the web application with the mentioned source.

# Installation

```node
npx create-react-app my-react-app
cd my-react-app
npm i react-vid-background
```

# Usage

```react
import {ReactVideoBg as VBg} from 'react-vid-background';

function App() {
  return (
    <div className="App">
      <VBg
        vidSrc='https://example.com/path/to/video.mp4'
        muted={true|false}
        autoPlay={true|false}
        loop={true|false}
        opacity={0.5} {/*opacity in decimal from 0 to 1*/}
        backgroundColor={'#3c3c3c'} {/*hex code of the theme color*/}
      >
        <div>
          {/*
            conent which goes here is display:flex
            and displays at the center of the screen
          */}
        </div>
      </VBg>
    </div>
  );
}

export default App;
```

## Props

The component takes some props which define how the video is displayed.

- vidSrc: URL to the source of the video
- muted: Specifies if the video should be muted
- autoPlay: Specifies if the video should play as soon as the page loads
- backgroundColor: Sets the theme of the layer which blurs the video in the mentioned color
- opacity: Opacity of the theme layer which blurs the video with the mentioned theme color

# Contributing

Pull requests are welcome. The project can be expanded in many ways with much more features and bugs be squashed if they arise.

---
_Source: https://npm.io/package/react-vid-background · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
