Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
/ slidr Public

A tiny framework-agnostic slider written in Typescript

License

Notifications You must be signed in to change notification settings

skulptur/slidr

Repository files navigation

Slidr

This slider library is about doing only as much as it needs to and then getting out of your way. It's tiny, it's flexible, and there are no external dependencies. Oh and you'll have to provide your own markup and styles, using whatever view framework you prefer (or none).

Usage:

import { createDraggableSlider } from 'slidr'

const draggableSlider = createDraggableSlider({
  container: mySliderContainerElement,
  slider: mySliderElement,
  items: myArrayOfElements,
  onIndexChange: (currentId) => {
    console.log(currentId)
  },
})

draggableSlider.next()
draggableSlider.previous()
draggableSlider.goTo(2)
draggableSlider.dispose()

About

A tiny framework-agnostic slider written in Typescript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published