{"id":15011814,"url":"https://github.com/zeromake/preact-animate","last_synced_at":"2025-10-06T05:31:13.825Z","repository":{"id":63279636,"uuid":"106397745","full_name":"zeromake/preact-animate","owner":"zeromake","description":"fork by https://github.com/react-component/animate","archived":true,"fork":false,"pushed_at":"2018-09-12T20:43:44.000Z","size":115,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-18T23:36:44.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeromake.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-10T09:39:12.000Z","updated_at":"2024-09-29T09:38:27.000Z","dependencies_parsed_at":"2022-11-16T07:01:59.534Z","dependency_job_id":null,"html_url":"https://github.com/zeromake/preact-animate","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromake%2Fpreact-animate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromake%2Fpreact-animate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromake%2Fpreact-animate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeromake%2Fpreact-animate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeromake","download_url":"https://codeload.github.com/zeromake/preact-animate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235021625,"owners_count":18923606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T19:41:45.244Z","updated_at":"2025-10-06T05:31:08.548Z","avatar_url":"https://github.com/zeromake.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# preact-animate\n---\n\nanimate preact or react element easily\n\n## Feature\n\n* support ie8,ie8+,chrome,firefox,safari\n\n## install\n\n`npm i preact-animate`\n\n## Usage\n\n### preact\n```jsx\nimport Animate from 'preact-animate';\n\npreact.render(\n  \u003cAnimate animation={{ ... }}\u003e\n    \u003cp key=\"1\"\u003e1\u003c/p\u003e\n    \u003cp key=\"2\"\u003e2\u003c/p\u003e\n  \u003c/Animate\u003e\n, mountNode);\n```\n\n### react\nset webpack alias\n\n``` javascript\nmodule.exports = {\n  resolve: {\n    alias: {\n      \"preact-animate\": \"preact-animate/dist/react-animate.js\"\n    }\n  }\n}\n```\n\nor rollup alias\n``` javascript\nconst alias = require('rollup-plugin-alias')\nmodule.exports = {\n  plugins: [new alias({\n    'preact-animate': 'preact-animate/dist/react-animate.js'\n  })]\n}\n```\n\n## API\n\n### props\n\n\u003ctable class=\"table table-bordered table-striped\"\u003e\n    \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth style=\"width: 100px;\"\u003ename\u003c/th\u003e\n        \u003cth\u003etype\u003c/th\u003e\n        \u003cth style=\"width: 50px;\"\u003edefault\u003c/th\u003e\n        \u003cth\u003edescription\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n          \u003ctd\u003ecomponent\u003c/td\u003e\n          \u003ctd\u003eReact.Element/String\u003c/td\u003e\n          \u003ctd\u003e'span'\u003c/td\u003e\n          \u003ctd\u003ewrap dom node or component for children. set to '' if you do not wrap for only one child\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003ecomponentProps\u003c/td\u003e\n          \u003ctd\u003eObject\u003c/td\u003e\n          \u003ctd\u003e{}\u003c/td\u003e\n          \u003ctd\u003eextra props that will be passed to component\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eshowProp\u003c/td\u003e\n          \u003ctd\u003eString\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003eusing prop for show and hide. [demo](http://react-component.github.io/animate/examples/hide-todo.html) \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003eexclusive\u003c/td\u003e\n          \u003ctd\u003eBoolean\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003ewhether allow only one set of animations(enter and leave) at the same time. \u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003etransitionName\u003c/td\u003e\n          \u003ctd\u003eString|Object\u003c/td\u003e\n          \u003ctd\u003e\u003c/td\u003e\n          \u003ctd\u003especify corresponding css, see ReactCSSTransitionGroup\u003c/td\u003e\n        \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003etransitionAppear\u003c/td\u003e\n         \u003ctd\u003eBoolean\u003c/td\u003e\n         \u003ctd\u003efalse\u003c/td\u003e\n         \u003ctd\u003ewhether support transition appear anim\u003c/td\u003e\n       \u003c/tr\u003e\n        \u003ctr\u003e\n          \u003ctd\u003etransitionEnter\u003c/td\u003e\n          \u003ctd\u003eBoolean\u003c/td\u003e\n          \u003ctd\u003etrue\u003c/td\u003e\n          \u003ctd\u003ewhether support transition enter anim\u003c/td\u003e\n        \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003etransitionLeave\u003c/td\u003e\n         \u003ctd\u003eBoolean\u003c/td\u003e\n         \u003ctd\u003etrue\u003c/td\u003e\n         \u003ctd\u003ewhether support transition leave anim\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonBeforeEnter\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation before Enter life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonEnter\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild, done: () =\u003e void) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation Enter life must called `done`\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonAfterEnter\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation after Enter life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonBeforeLeave\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation before Leave life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonLeave\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild, done: () =\u003e void) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation Leave life must called `done`\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonAfterLeave\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation after Leave life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonBeforeAppear\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation before appear life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonAppear\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild, done: () =\u003e void) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation Appear life must called `done`\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonAfterAppear\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation after Appear life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonBeforeDisappear\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation before Disappear life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonDisappear\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild, done: () =\u003e void) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation Disappear life must called `done`\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonAfterDisappear\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild) =\u003e void;\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation after Disappear life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eonAfterCancelled\u003c/td\u003e\n         \u003ctd\u003efunction(child: AnimateChild, status: number) =\u003e any\u003c/td\u003e\n         \u003ctd\u003enull\u003c/td\u003e\n         \u003ctd\u003eanimation after cancelled life\u003c/td\u003e\n       \u003c/tr\u003e\n       \u003ctr\u003e\n         \u003ctd\u003eanimation\u003c/td\u003e\n         \u003ctd\u003eObject\u003c/td\u003e\n         \u003ctd\u003e{}\u003c/td\u003e\n         \u003ctd\u003e\n            to animate with js. see animation format below.\n         \u003c/td\u003e\n       \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\n### animation format\n\nwith appear, enter and leave as keys. for example:\n\n```js\n  {\n    appear: function(node, done){\n      node.style.display='none';\n      $(node).slideUp(done);\n      return {\n        stop:function(){\n          // jq will call done on finish\n          $(node).stop(true);\n        }\n      };\n    },\n    enter: function(){\n      this.appear.apply(this,arguments);\n    },\n    leave: function(node, done){\n      node.style.display='';\n      $(node).slideDown(done);\n      return {\n        stop:function(){\n          // jq will call done on finish\n          $(node).stop(true);\n        }\n      };\n    }\n  }\n```\n\n## License\n\npreact-animate is released under the MIT license.\n\n## Thank\n\nfork by [rc-animate](https://github.com/react-component/animate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeromake%2Fpreact-animate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeromake%2Fpreact-animate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeromake%2Fpreact-animate/lists"}