0.0.1 • Published 6 years ago

react-rotate-list v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

react-rotate-list

Auto rotate list

NPM JavaScript Style Guide

Install

yarn add react-rotate-list

Usage

import React, { Component } from 'react'
import RotateList from 'react-rotate-list'

class Example extends Component {
  render () {
    const {somethingData} = this.props;
    return (
      <RotateList height={600}>
        {somethingData.map(({title, desc}, i) => (
          <li key={i}>
            <h6>{title}</h6>
            <p>{desc}</p>
          </li>
        ))}
      </RotateList>
    )
  }
}

Available Props

keytype(s)defaultPropsdescription
style[object]{}react-rotate-list's container styles
ulStyle[object]{}react-rotate-list's list wrapper style
height[number]400container's maxHeight (if height is smaller than list contentHeight, rotate will be disabled)
delay[number]3000delay to next rotate (delay must be bigger than duration)
duration[number]750animation transition value
children[element, array[element]]children

License

MIT © juyeong1260

0.0.1

6 years ago

1.0.0

6 years ago