Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-animated-list

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-animated-list

Simple way of animating when components are added or removed from an array

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Animated List

Intro

React animated list is a simple way you can have any of your array-based elements be automatically animated. This applies to when they are both rendered, and removed.

Edit nifty-platform-dj1iz Example Gif

Getting Started

Installing

yarn add react-animated-list

Usage

react-animated-list exports a named component AnimatedList. Importing this will allow you to wrap a list of other components you want animated as follows:

import { AnimatedList } from 'react-animated-list';
import { MyOtherComponent } from './MyOtherComponent';

const MyComponent = ({myData}) => (
  <AnimatedList animation={"grow"}>
    {otherComponents.map((c) => (
      <MyOtherComponent key={c.id} />
    ))}
  </AnimatedList>
)

Note that the key property is required on the child components, this is used to determine which elements to animate in/out

The AnimatedListComponent can be configured with the following properties:

NameTypeDefaultDescription
animationgrow, fade, slide, zoom, collapsegrowThe type of animation to use
animationPropsnoneThe props that should be passed to the Material UI component that handles the rendering. See https://material-ui.com/api/grow/#grow-api for more examples
initialAnimationDurationnumber750How long the enter animation for the list should take on the initial render

Keywords

FAQs

Package last updated on 28 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc