Skip to main content
Version: 2

Installation

The BoxSlider library is available as React components, Web Components and as a core JavaScript/TypeScript library.

React

The React components package can be installed via NPM. See the React guide for detailed instructions.

npm install --save @boxslider/react

Web Components

The Web components package can also be installed via NPM or used directly from a CDN. See the Web Components guide for detailed instructions.

Install via NPM

npm install --save @boxslider/components

Use from CDN

<script type="module" src="https://esm.sh/@boxslider/components"></script>

<bs-slider-controls>
<bs-carousel speed="300">
<div class="slide">Slide one</div>
<div class="slide">Slide tow</div>
<div class="slide">Slide three</div>
</bs-carousel>
</bs-slider-controls>

JavaScript

The core slider package can be installed via NPM or used directly from a CDN. See the JavaScript guide for detailed instructions.

Install from NPM

npm install --save @boxslider/slider

Use directly from a CDN

<script type="module">
import { createFadeSlider } from 'https://esm.sh/@boxslider/slider'

const slider = createFadeSlider('#slider')
</script>

If you find BoxSlider helpful, please consider giving it a star on GitHub

Star BoxSlider