2.0.3 • Published 3 years ago

react-auto-glide v2.0.3

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

React Auto Glide

Customizable component which lets you have your own content glide smoothly accross the screen.

NPM JavaScript Style Guide

Install

npm i react-auto-glide

Usage

See the docs for more in depth demos and examples!

import { ReactScrolling } from 'react-auto-glide';
import 'react-auto-glide/dist/index.css'

const imgs = [
  React, Redux, GraphQL, Ramda,
];

const mapper = item => (
  <div className="img-container" key={item}>
    <Img src={item} alt="" />
  </div>
)

const App = () => {
  return (
  <section className="hero">
    <div className="scrolling-container">
      <ReactScrolling
        mapper={mapper}
        list={imgs} 
        time="30s"
        width="100px"
        delayBetweenScroll="1000"
      />
    </div>
  </section>
  )
}

Props

See the docs for more information about each prop and examples of how it effects the container

PropDescriptionRequiredDefault
mapperA function for rendering each element in your list exactly as required.Requiredn/a
listAn array of items for the mapper function to be applied tooRequiredn/a
timeThe amount of time you want it to take for the elements to glide from the right of the container to the left of the containerNot Required30s
widthString that defines the width for each element inside the div which is scrollingNot Required"100px"
delayBetweenScrollNumber that defines ms between element reaching the end of the container and scroll restarting, if no number is entered defaults to no delayNot RequiredNo Delay

License

MIT © ElijahBurke

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.7

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago