@dajk/react-carousel

0.0.0-alpha.7 • Public • Published

react-carousel

Carousel for React

npm codecov npm bundle size

Install

npm install @dajk/react-carousel

or

yarn add @dajk/react-carousel

Usage

import React from 'react'
import Carousel from '@dajk/react-carousel'

export const items = [
  { backgroundColor: 'blue', color: 'white' },
  { backgroundColor: 'red', color: 'white' },
  { backgroundColor: 'green', color: 'white' },
  { backgroundColor: 'yellow', color: 'black' },
]

const MyCarousel = () => {
  return (
    <Carousel>
      {items.map((item, index) => {
        return (
          <div
            key={index}
            style={{
              height: 200,
              display: 'flex',
              alignItems: 'center',
              justifyContent: 'center',
              ...item,
            }}
          >
            {index}
          </div>
        )
      })}
    </Carousel>
  )
}

License

MIT © dajk

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.0-alpha.70latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.0-alpha.70
0.0.0-alpha.60
0.0.0-alpha.50
0.0.0-alpha.40

Package Sidebar

Install

npm i @dajk/react-carousel

Weekly Downloads

0

Version

0.0.0-alpha.7

License

MIT

Unpacked Size

34.8 kB

Total Files

14

Last publish

Collaborators

  • dajk