Skip to content

Commit a57cba8

Browse files
committed
Update README.md
1 parent b7404c3 commit a57cba8

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

README.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,37 @@ export const App = () => {
6363
};
6464
```
6565

66-
And see [examples](./stories) for more usages.
66+
## API
67+
68+
### useAnimation
69+
70+
A basic hook to use Web Animations API.
71+
72+
[Examples](./stories/hooks/useAnimation.stories.tsx)
73+
74+
### useAnimations
75+
76+
Same as [useAnimation](#useanimation), but it can have animation definitions more than 1.
77+
78+
[Examples](./stories/hooks/useAnimations.stories.tsx)
79+
80+
### useAnimationFunction
81+
82+
Same as [useAnimation](#useanimation), but it drives function not React element.
83+
84+
[Examples](./stories/hooks/useAnimationFunction.stories.tsx)
85+
86+
### useTransitionAnimation
87+
88+
Similar to [useAnimations](#useanimations), but it plays when element enter/update/exits.
89+
This hook must be used under [AnimationGroup component](#animationgroup).
90+
91+
[Examples](./stories/hooks/useTransitionAnimation.stories.tsx)
92+
93+
### AnimationGroup
94+
95+
A component to provide some behavior to its children.
96+
Currently it only detects enter/update/exit of children by key, that works similar to [TransitionGroup of react-transition-group](https://reactcommunity.org/react-transition-group/transition-group).
6797

6898
## Use polyfill
6999

0 commit comments

Comments
 (0)