react-transition-group README

The project's README from github.com/reactjs/react-transition-group. As one markdown file: README.md.

react-transition-group npm

ATTENTION! To address many issues that have come up over the years, the API in v2 and above is not backwards compatible with the original React addon (v1-stable).

For a drop-in replacement for react-addons-transition-group and react-addons-css-transition-group, use the v1 release. Documentation and code for that release are available on the v1-stable branch.

We are no longer updating the v1 codebase, please upgrade to the latest version when possible

A set of components for managing component states (including mounting and unmounting) over time, specifically designed with animation in mind.

Documentation

TypeScript

TypeScript definitions are published via DefinitelyTyped and can be installed via the following command:

npm install @types/react-transition-group

Examples

Clone the repo first:

[email protected]:reactjs/react-transition-group.git

Then run npm install (or yarn), and finally npm run storybook to start a storybook instance that you can navigate to in your browser to see the examples.

react-transition-group (reactjs/react-transition-group)

Searching Database…

What is this?react-transition-group is a set of React components for managing component states, including mounting and unmounting, over time, specifically designed with animation in mind.
Is it a framework or a small library?It is a lightweight library of React components (Transition, CSSTransition, TransitionGroup, SwitchTransition) that you compose into your own React app, not a standalone framework.
How do I add it to a project?Install it via npm/yarn as a dependency and import the components you need (Transition, CSSTransition, etc.) into your React code; TypeScript types are available separately via DefinitelyTyped.
What does it require besides React?It depends on dom-helpers, prop-types, loose-envify and @babel/runtime under the hood, and is meant to be used inside a React project.
Is v2+ a drop-in replacement for the old React addon?No. The v2+ API is not backwards compatible with the original react-addons-transition-group/react-addons-css-transition-group; for a drop-in replacement you need to use the v1 release, which is no longer being updated.
How can I try out the examples?Clone the repo, run npm install (or yarn), then npm run storybook to launch a local Storybook instance with live examples in your browser.
If I used the old react-addons-transition-group, should I upgrade?You can keep using v1-stable since it mirrors the old addon API, but react-transition-group is no longer updating that branch, so new projects should migrate to v2+ using the provided migration guide.
What am I actually importing from this package?Components like Transition, CSSTransition, TransitionGroup and SwitchTransition that let you animate React elements as they mount, update, and unmount.
Creator
reactjs
Size
14.2 MB
Stars
10.2K
Age
9y
Commits · 90 Days