0.0.5 • Published 1 year ago

react-swipeable-scroll-snap-carousel v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

react-swipeable-scroll-snap-carousel

A tiny swipeable carousel built with scroll snap for React

Features

  • Carousel by scroll-snap-type
  • Swipeable by mouse event
  • programmatically changed index

Getting Started

npm install react-swipeable-scroll-snap-carousel
import React, { useState } from 'react'
import { Carousel } from 'react-swipeable-scroll-snap-carousel'

function App() {
  const [index, setIndex] = useState(0)
  return (
    <Carousel index={index} onChangeIndex={setIndex}>
      <div style={{ backgroundColor: 'pink' }}>1</div>
      <div style={{ backgroundColor: 'skyblue' }}>2</div>
    </Carousel>
  )
}
0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago