Skip to content

pjb0811/react-3d-carousels

Repository files navigation

react-3d-carousels

carousel app using react & react-motion

NPM JavaScript Style Guide

This package is included in react-motion-components.

Install

npm install --save react-3d-carousels

Usage

demo

import * as React from 'react'

import Carousel from 'react-3d-carousels'

class Example extends React.Component {
  render () {
    return (
      <div>
        <h1>react-3d-carousels</h1>
        <div
          style={{
            width: 300,
            height: 300,
            margin: '0 auto'
          }}
        >
          <Carousel
            ref={carousel => (this.carousel = carousel)}
            width={300}
            height={300}
            direction={'horizontal'}
            effect={'3d'}
            index={0}
          >
            <div style={{ background: 'green', width: 300, height: 300 }}>
              1
            </div>
            <div style={{ background: 'red', width: 300, height: 300 }}>2</div>
            <div style={{ background: 'blue', width: 300, height: 300 }}>3</div>
            <div style={{ background: 'yellow', width: 300, height: 300 }}>
              4
            </div>
          </Carousel>
      </div>
    )
  }
}

License

MIT © pjb0811

About

carousel app using react & react-motion

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published