You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple React library that provides components for managing animations and transitions with ease. It allows seamless transitions for both individual components and groups of elements. The library is inspired by [react-transition-group](https://reactcommunity.org/react-transition-group/) and shares a similar API with a few notable differences.
7
-
8
-
## Key Features
9
-
10
-
-**Ease of Use**: Simple and intuitive API for creating animations and transitions for both components and groups of elements.
11
-
-**Modern Approach**: Built with functional components and hooks, avoiding deprecated methods like `findDOMNode`.
12
-
-**No External Dependencies**: No additional dependencies, keeping your project lightweight and reducing potential conflicts.
13
-
-**No `nodeRef` Required**: Unlike `react-transition-group`, there's no need to pass a `nodeRef` prop.
14
-
-**Flexibility**: Supports both CSS-based and inline style-based animations.
15
-
-**Lightweight**: Minimal bundle size to keep your application fast.
16
-
17
-
The library provides components that allow you to easily create custom components with animations and transitions tailored to your needs. You can integrate them into your own React components to add smooth animations and transitions with minimal effort.
6
+
A library that provides React components for managing animations and transitions with ease. It allows seamless transitions for both individual components and groups of elements. Lightweight and has no dependencies. Inspired by [react-transition-group](https://reactcommunity.org/react-transition-group/) and has almost the same API.
18
7
19
8
```tsx
20
9
<FadeTransitionin={visible}>
21
10
<div>Fading element</div>
22
11
</FadeTransition>
23
12
```
24
13
14
+
## Key Features
15
+
16
+
- Built with functional components and hooks, avoiding deprecated methods like `findDOMNode`.
17
+
- Unlike `react-transition-group`, there's no need to pass a `nodeRef` prop.
18
+
- Supports both CSS-based and inline style-based transitions.
19
+
- Minimal bundle size.
20
+
- No dependencies.
21
+
25
22
## Installation
26
23
27
-
To install the library, run:
24
+
To install `react-transitioning`, run the following command in your project:
28
25
29
26
```bash
30
27
npm install react-transitioning
@@ -36,7 +33,7 @@ yarn add react-transitioning
36
33
37
34
For more detailed information and usage examples, check out the [Docs](https://fakundo.github.io/react-transitioning/).
38
35
39
-
## Usage
36
+
## Quick Review
40
37
41
38
### Transition Component
42
39
@@ -47,7 +44,7 @@ import { Transition } from 'react-transitioning'
47
44
48
45
...
49
46
50
-
<Transitionin={!hidden}appearexit={false}>
47
+
<Transitionin={visible}appearexit={false}>
51
48
{(transitionState) => (
52
49
<pre>{JSON.stringify(transitionState)}</pre>
53
50
)}
@@ -63,7 +60,7 @@ import { CSSTransition } from 'react-transitioning'
63
60
64
61
...
65
62
66
-
<CSSTransitionin={!hidden}classNames="fade">
63
+
<CSSTransitionin={visible}classNames="fade">
67
64
<div>Animated element</div>
68
65
</CSSTransition>
69
66
```
@@ -78,7 +75,7 @@ import { StyleTransition } from 'react-transitioning'
78
75
...
79
76
80
77
<StyleTransition
81
-
in={!hidden}
78
+
in={visible}
82
79
duration={300}
83
80
styles={{
84
81
enter: { opacity: 0 },
@@ -107,22 +104,9 @@ import { TransitionGroup } from 'react-transitioning'
The `styles` prop allows you to define inline styles based on the current transition state. For example, when the element enters, the `enterActive` styles will be applied.
A simple React library that provides components for managing animations and transitions with ease. It allows seamless transitions for both individual components and groups of elements. The library is inspired by [react-transition-group](https://reactcommunity.org/react-transition-group/) and shares a similar API with a few notable differences.
11
-
12
-
## Key Features
13
-
14
-
-**Ease of Use**: Simple and intuitive API for creating animations and transitions for both components and groups of elements.
15
-
-**Modern Approach**: Built with functional components and hooks, avoiding deprecated methods like `findDOMNode`.
16
-
-**No External Dependencies**: No additional dependencies, keeping your project lightweight and reducing potential conflicts.
17
-
-**No `nodeRef` Required**: Unlike `react-transition-group`, there's no need to pass a `nodeRef` prop.
18
-
-**Flexibility**: Supports both CSS-based and inline style-based animations.
19
-
-**Lightweight**: Minimal bundle size to keep your application fast.
20
-
21
-
The library provides components that allow you to easily create custom components with animations and transitions tailored to your needs. You can integrate them into your own React components to add smooth animations and transitions with minimal effort.
10
+
A library that provides React components for managing animations and transitions with ease. It allows seamless transitions for both individual components and groups of elements. Lightweight and has no dependencies. Inspired by [react-transition-group](https://reactcommunity.org/react-transition-group/) and has almost the same API.
22
11
23
12
```tsx
24
13
<FadeTransitionin={visible}>
25
14
<div>Fading element</div>
26
15
</FadeTransition>
27
16
```
28
17
18
+
## Key Features
19
+
20
+
- Built with functional components and hooks, avoiding deprecated methods like `findDOMNode`.
21
+
- Unlike `react-transition-group`, there's no need to pass a `nodeRef` prop.
22
+
- Supports both CSS-based and inline style-based transitions.
23
+
- Minimal bundle size.
24
+
- No dependencies.
25
+
29
26
## Installation
30
27
31
28
To install `react-transitioning`, run the following command in your project:
-[Basic Transition Component](../?path=/docs/examples-basic-transition--docs): Demonstrates the functionality of a basic transition component.
39
+
-[Fade Transition with Inline Styles](../?path=/docs/examples-fade-transition-inline-styles--docs): Implements a fading transition using inline styles.
40
+
-[Fade Transition with Class Names](../?path=/docs/examples-fade-transition-class-names--docs): Implements a fading transition using CSS class names.
41
+
-[Transition Group: Conditional Render](../?path=/docs/examples-transition-group-conditional-render--docs): Renders children conditionally with animations.
42
+
-[Transition Group: Item List](../?path=/docs/examples-transition-group-item-list--docs): Renders an array of items with animations.
43
+
39
44
## Components Overview
40
45
41
46
The library includes the following components to manage transitions and animations:
42
47
43
48
-[Transition](../?path=/docs/components-transition--docs): Controls the mounting and unmounting of a component with transitions.
44
49
-[StyleTransition](../?path=/docs/components-styletransition--docs): Applies inline styles during the transition phases.
45
50
-[CSSTransition](../?path=/docs/components-csstransition--docs): Adds CSS classes during the transition phases for seamless animations.
46
-
-[TransitionGroup](../?path=/docs/components-transitiongroup--docs): Manages a group of transitioning elements.
47
-
48
-
## Usage Examples
49
-
50
-
-[Basic Transition Component](../?path=/docs/examples-basic-transition--docs): Demonstrates the functionality of a basic transition component.
51
-
-[Fade Transition with Inline Styles](../?path=/docs/examples-fade-transition-inline-styles--docs): Implements a fading transition using inline styles.
52
-
-[Fade Transition with Class Names](../?path=/docs/examples-fade-transition-class-names--docs): Implements a fading transition using CSS class names.
53
-
-[Transition Group: Conditional Render](../?path=/docs/examples-transition-group-conditional-render--docs): Renders children conditionally with animations.
54
-
-[Transition Group: Item List](../?path=/docs/examples-transition-group-item-list--docs): Renders an array of items with animations.
51
+
-[TransitionGroup](../?path=/docs/components-transitiongroup--docs): Manages a group of transitioning elements.
0 commit comments