p-m-p / slider

A modern, light weight content slider

Home Page:https://philparsons.co.uk/slider/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Box Slider

A modern, light weight content slider

NPM Status Build Status

About

BoxSlider is a small library with zero dependencies that provides a light-weight, responsive content slider with multiple slide transition effects for modern browsers.

The library can be used standalone or via React and web components. View the website for full details.

Installation

Install from NPM

npm install --save @boxslider/slider

Use from CDN

<script type="module">
  import {
    BoxSlider,
    FadeSlider,
  } from 'https://cdn.jsdelivr.net/npm/@boxslider/slider/+esm'

  const slider = new BoxSlider(
    document.getElementById('slider'),
    new FadeSlider(),
  )
</script>

React

Install via NPM

npm install --save @boxslider/react
import { SliderControls, CarouselSlider } from '@boxslider/react'

function MySlider({ children }) {
  return (
    <SliderControls>
      <CarouselSlider>{children}</CarouselSlider>
    </SliderControls>
  )
}

View the React guide for full details

Web Components

Install via NPM

npm install --save @boxslider/components

Use from CDN

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/@boxslider/components/+esm"></script>

<bx-slider-controls>
  <bs-carousel>
    <!-- Slides -->
  </bs-carousel>
</bx-slider-controls

View the web components guide for full details.

About

A modern, light weight content slider

https://philparsons.co.uk/slider/

License:MIT License


Languages

Language:TypeScript 87.1%Language:CSS 9.0%Language:JavaScript 2.4%Language:HTML 1.5%