Blaze Slider

Installation

Add Blaze Slider to your project via NPM or CDN

NPM

npm install blaze-slider

Then import the library and its styles:

import BlazeSlider from 'blaze-slider';
import 'blaze-slider/dist/blaze.css';

The CSS import is required. The slider won't render correctly without it.

View npm example on CodeSandbox →

CDN

Add the script and stylesheet directly to your HTML:

<link
  rel="stylesheet"
  href="https://unpkg.com/blaze-slider@latest/dist/blaze.css"
/>
<script src="https://unpkg.com/blaze-slider@latest/dist/blaze-slider.min.js"></script>

This exposes a global BlazeSlider constructor:

<script>
  new BlazeSlider(document.querySelector('.blaze-slider'));
</script>

View CDN example on CodeSandbox →

Available builds

BuildURL
Productionhttps://unpkg.com/blaze-slider@latest/dist/blaze-slider.min.js
Developmenthttps://unpkg.com/blaze-slider@latest/dist/blaze-slider.dev.js
CSShttps://unpkg.com/blaze-slider@latest/dist/blaze.css

The development build logs warnings for invalid configurations. Use it while building, then switch to the minified version for production.

Pinning a version

Replace latest with a specific version:

https://unpkg.com/blaze-slider@1.0.0/dist/blaze-slider.min.js

For production, consider self-hosting these files instead of relying on a CDN.

On this page