LaravelLaravel & VueJsVueJs

Video Background component for Vue.js



vue-videobg

Video Background is a component for Vue.js projects, to help users add a video playing as the background of their page, by Pantelis Peslis.

Example

Install via NPM or yarn

npm install --save vue-videobg

yarn add vue-videobg

Usage

Import the component to your main file to be able to use it globally

import VideoBg from 'vue-videobg'

Vue.component('video-bg', VideoBg)

Use the component in your templates by using a video of your choice and an image to replace the video in case it fails

<video-bg :sources="['someURL']" img="someURL">
<!-- If you want to add content here, a slot is waiting! -->
</video-bg>

It is simple as that, if you want to give it a try head to the GitHub repo.




Source link
★ READ ALSO ★  Docker WordPress Dev Environment – JimFrenette.com

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close