Skip to content

jayehmke/react-rotation

 
 

Repository files navigation

react-rotation Build Status

React rotation component

Supports wheel, mouse and touch events

Install

npm install --save react-rotation

Usage

import React from 'react';
import { render } from 'react-dom';
import Rotation from 'react-rotation';

render(
  <Rotation>
    <img src='images/00.jpg' />
    <img src='images/01.jpg' />
    <img src='images/02.jpg' />
    <img src='images/03.jpg' />
  </Rotation>,
  document.querySelector('.container')
);

Props

  • className - class name of container, string
  • cycle - cyclic rotation, boolean, default false
  • scroll - rotation by wheel/scroll, boolean, default true
  • vertical - vertical orientation, boolean, default false
  • onChange - frame change event handler, function

Related

  • circlr — animation rotation via scroll, mouse and touch events

License

MIT

Packages

No packages published

Languages

  • JavaScript 100.0%