Set up

Download and set up

Presentation

Vegas is a JavaScript library (v3) which adds beautiful animated background slideshows to your page body or any of its elements. A jQuery wrapper is available for backward compatibility.

Installation

Quickly get up and running with Vegas.

NPM

Install Vegas via NPM.

npm install vegas

ES Module

Import Vegas in your JavaScript.

  • Vanilla JS
  • jQuery
import vegas from 'vegas';
import 'vegas/dist/vegas.css';
import 'vegas/jquery';
import 'vegas/dist/vegas.css';

CDN

Include the CSS file.

<link rel="stylesheet" href="https://unpkg.com/vegas/dist/vegas.min.css">

For vanilla JS, include the IIFE script.

<script src="https://unpkg.com/vegas/dist/vegas.iife.min.js"></script>

For jQuery compatibility, include jQuery then the jQuery wrapper instead.

<script src="https://code.jquery.com/jquery.min.js"></script>
<script src="https://unpkg.com/vegas/dist/jquery.vegas.min.js"></script>

Get started

Apply Vegas to body or any element.

  • Vanilla JS
  • jQuery
vegas('#example', {
    slides: [
        { src: '/img/slide1.jpg' },
        { src: '/img/slide2.jpg' },
        { src: '/img/slide3.jpg' },
        { src: '/img/slide4.jpg' }
    ]
});
$('#example').vegas({
    slides: [
        { src: '/img/slide1.jpg' },
        { src: '/img/slide2.jpg' },
        { src: '/img/slide3.jpg' },
        { src: '/img/slide4.jpg' }
    ]
});
Test the code

Click the button to test the example.

Run code

Read the Settings page for more information.

Zip file

Download the last version (2.5.4).

Download

Source code

Fork the project and contribute.

Source

Need support?

Don't waste your precious time, support is available for 24$. Ask your question and quickly receive a ZIP file with a clear running example with commented code and assets solving your problem.