React rotation component
Supports wheel, mouse and touch events
npm install --save react-rotationimport 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')
);className- class name of container, stringcycle- cyclic rotation, booleanonChange- frame change event handler, function
- circlr — animation rotation via scroll, mouse and touch events
MIT