# react-move **Repository Path**: mirrors_fkhadra/react-move ## Basic Information - **Project Name**: react-move - **Description**: React Move 🌀 Beautiful, data-driven animations for React - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-01-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
# React-Move Beautiful, data-driven animations for React. [](https://travis-ci.org/react-tools/react-move) [](https://www.npmjs.com/package/react-move) [](https://www.npmjs.com/package/react-move) [](https://github.com/react-tools/react-move/blob/master/LICENSE)  [](https://spectrum.chat/react-move) ### Go to [live examples, code and docs](https://react-move.js.org)! ## Features * Built-in support for interpolating: * Strings * Numbers * Colors * SVG paths * SVG transforms * Animate HTML, SVG & React-Native * Fine-grained control of delay, duration and easing * Animation lifecycle events: start, interrupt, end * Custom tweening functions * Awesome documentation and lots of examples * Supported in React, React-Native & React-VR * Supports TypeScript ## Demos * [CodeSandbox - Draggable List](https://codesandbox.io/s/j2povnz8ly) * [CodeSandbox - Circle Inferno](https://codesandbox.io/s/n033m6nw00) * [CodeSandbox - Animated Mount/Unmount](https://codesandbox.io/s/9z04rpypny) * [Examples](https://react-move.js.org) ## React-Move vs React-Motion * React-move allows you to define your animations using durations, delays and ease functions. In react-motion you use spring configurations to define your animations. * React-move has built-in support for interpolating strings, numbers, colors, SVG paths and SVG transforms. With react-motion you can only interpolate numbers so you have to do a bit more work or include another library to work with colors, paths, etc. * In react-move you can define different animations for entering, updating and leaving with the ability to specify delay, duration and ease on each individual key. React-motion allows you to define a spring configuration for each key in the "style" object. * React-move has lifecycle events on its transitions. You can pass a function to be called on transition start, interrupt or end. React-motion has an "onRest" prop that fires a callback when the animation stops (just the `Motion` component not `TransitionMotion` or `StaggeredMotion`). * React-move also allows you to pass your own custom interpolators. It's all springs in react-motion. ## Questions? Ideas? Chat with us! Sign up for the [React-Tools Spectrum Community](https://spectrum.chat/react-move)! ## Installation ```bash $ yarn add react-move # or $ npm install react-move ``` # Documentation The docs below are for version **2.x.x** of React-Move. Older versions: * [Version 1.x.x](https://github.com/react-tools/react-move/tree/v1.6.1) ## < NodeGroup /> The NodeGroup component allows you to create complex animated transitions. You pass it an array of objects and a key accessor function and it will run your enter, update and leave transitions as the data updates. The idea is similar to transition components like [react-transition-group](https://github.com/reactjs/react-transition-group) or [react-motion's TransitionMotion](https://github.com/chenglou/react-motion) but you use objects to express how you want your state to transition. Not only can you can have independent duration, delay and easing for entering, updating and leaving but each individual key in your state can define its own timing! ### Component Props | Name | Type | Default | Description | | :------------------------------------------------- | :------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | data \* | Array | | An array of data objects. The data prop is treated as immutable so the nodes will only update if prev.data !== next.data. | | keyAccessor \* | function | | Function that returns a string key given a data object and its index. Used to track which nodes are entering, updating and leaving. | | start \* | function | | A function that returns the starting state. The function is passed the data and index and must return an object. | | enter | function | () => {} | A function that **returns an object or array of objects** describing how the state should transform on enter. The function is passed the data and index. | | update | function | () => {} | A function that **returns an object or array of objects** describing how the state should transform on update. The function is passed the data and index. | | leave | function | () => {} | A function that **returns an object or array of objects** describing how the state should transform on leave. The function is passed the data and index. | | children \* | function | | A function that renders the nodes. It should accept an array of nodes as its only argument. Each node is an object with the key, data, state and a type of 'ENTER', 'UPDATE' or 'LEAVE'. | * required props ### Usage Go to [live examples, code and docs](https://react-move.js.org)! A typical usage of NodeGroup looks like this... ```js