1.0.4 • Published 6 months ago

react-smooth-list v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

react-smooth-list

🍿 React component for animating child nodes

ezgif com-gif-maker

See an example here.

Installation

This package is distributed via npm.

npm install react-smooth-list

Basic Usage

Here's the basic concept of how it rocks:

import SmoothList from 'react-smooth-list';
// ...
<SmoothList>
  <div>1</div>
  <div>2</div>
  <div>3</div>
  <div>4</div>
  <div>5</div>
  <div>6</div>
</SmoothList>

Options

Animates its children, one by one.

⚠️ To have children animate separately, they must be first-level children of the <SmoothList> component (i.e. members of its props.children).

Props

KeyTypeDefaultDescription
delaynumber50Delay between each child's animation in milliseconds.
transitionDurationnumber400Duration of each child's animation in milliseconds.
classNamestringAdds a className prop to the container div.
childClassNamestringAdds a className prop to each child div, allowing you to style the direct children of the SmoothList component.
wrapperTagstring"div"Override the HTML element of the wrapping div.
childTagstring"div"Override the HTML element wrapped around each child element.
visiblebooleanIf not undefined, the visible prop can be used to control when the fade in occurs. If set to false after the fade-in animation completes, the children will fade out one by one.
onCompletefunctionSpecifies a callback to be called when the animation completes.
animatedbooleantrue
1.0.4

6 months ago

1.0.3

1 year ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago