1.0.11 • Published 3 years ago

react-villax v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-villax

React Parallax with background video support.

This is originally forked from react-parallax.

Install

npm i react-villax

Demo on codesandbox

Usage examples

Basic - background video

import { Parallax } from 'react-villax';

const Container = () => (
    <Parallax blur={10} bgVideo="path/to/video.mp4" strength={200}>
        Content goes here. Parallax height grows with content height.
    </Parallax>
);

Optional props to use

  • bgVideoStyle - optional styles
  • bgVideoType - 'video/mp4' or 'video/webm' or 'video/ogg' - default = 'video/mp4'
  • muted - boolean - default = true
  • autoPlay - boolean - default = true
  • loop - boolean - default = true

Example

import { Parallax } from 'react-villax';

const Container = () => (
    <Parallax
        bgVideo="path/to/video.mp4"
        muted={false}
        loop={false}
        bgVideoStyle={{
            opacity: 0.6,
        }}
    >
        Content goes here. Parallax height grows with content height.
    </Parallax>
);
1.0.11

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago