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