Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork61
🎯 React UI animation made easy
License
NotificationsYou must be signed in to change notification settings
beekai-oss/react-simple-animate
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
React UI animation made easy
- Animation from style A to B
- CSS keyframes animation
- Chain up animation sequences
- Tiny size without other dependency
$ npm install react-simple-animateimportReactfrom"react";import{Animate,AnimateKeyframes,AnimateGroup}from"react-simple-animate";exportdefault()=>(<>{/* animate individual element. */}<Animateplaystart={{opacity:0}}end={{opacity:1}}><h1>React simple animate</h1></Animate>{/* animate keyframes with individual element. */}<AnimateKeyframesplayiterationCount="infinite"keyframes={["opacity: 0","opacity: 1"]}><h1>React simple animate with keyframes</h1></AnimateKeyframes>{/* animate group of animation in sequences */}<AnimateGroupplay><Animatestart={{opacity:0}}end={{opacity:1}}sequenceIndex={0}> first</Animate><Animatestart={{opacity:0}}end={{opacity:1}}sequenceIndex={1}> second</Animate><Animatestart={{opacity:0}}end={{opacity:1}}sequenceIndex={2}> third</Animate></AnimateGroup></>);
importreactfrom'react';import{useAnimate,useAnimateKeyframes,useAnimateGroup}from'react-simple-animate';exportconstuseAnimateExample=()=>{const{ style, play}=useAnimate({start:{opacity:0},end:{opacity:1}});useEffect(()=>play(true),[]);return<divstyle={style}>useAnimate</div>;};exportconstuseAnimateKeyframesExample=()=>{const{ style, play}=useAnimateKeyframes({keyframes:['opacity: 0','opacity: 1'],iterationCount:4});useEffect(()=>play(true),[]);return<divstyle={style}>useAnimate</div>;};exportconstuseAnimateGroup=()=>{const{ styles=[], play}=useAnimateGroup({sequences:[{start:{opacity:1},end:{opacity:0}},{start:{background:"red"},end:{background:"blue"}}]});useEffect(()=>play(true),[]);return{styles.map(style=><divstyle={style}>useAnimateGroup</div>)};};
We also makeBEEKAI. Build the next-generation forms with modern technology and best in class user experience and accessibility.
About
🎯 React UI animation made easy
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors13
Uh oh!
There was an error while loading.Please reload this page.
