{"id":15657071,"url":"https://github.com/react-component/motion","last_synced_at":"2025-04-13T08:55:07.952Z","repository":{"id":37931433,"uuid":"285152996","full_name":"react-component/motion","owner":"react-component","description":"⛷ CSS Animation for React","archived":false,"fork":false,"pushed_at":"2025-02-18T02:59:38.000Z","size":10071,"stargazers_count":162,"open_issues_count":9,"forks_count":46,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T05:05:18.324Z","etag":null,"topics":["ant-design","antd","react","react-component"],"latest_commit_sha":null,"homepage":"https://motion-seven.vercel.app","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/react-component.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"ant-design","patreon":null,"open_collective":"ant-design","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2020-08-05T02:09:55.000Z","updated_at":"2025-04-04T04:36:59.000Z","dependencies_parsed_at":"2024-06-17T07:47:11.351Z","dependency_job_id":"69df0034-b477-476f-9b91-09f0db726c7e","html_url":"https://github.com/react-component/motion","commit_stats":{"total_commits":117,"total_committers":17,"mean_commits":6.882352941176471,"dds":0.2649572649572649,"last_synced_commit":"7efe95dece44793662bea45a64c8f664480241ff"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":"react-component/footer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmotion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmotion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmotion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-component%2Fmotion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-component","download_url":"https://codeload.github.com/react-component/motion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248688544,"owners_count":21145763,"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":["ant-design","antd","react","react-component"],"created_at":"2024-10-03T13:05:13.984Z","updated_at":"2025-04-13T08:55:07.934Z","avatar_url":"https://github.com/react-component.png","language":"TypeScript","readme":"# rc-motion\n\n\u003c!-- prettier-ignore --\u003e\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/rc-motion.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/rc-motion\n[travis-image]: https://img.shields.io/travis/react-component/motion/master?style=flat-square\n[travis-url]: https://travis-ci.com/react-component/motion\n[github-actions-image]: https://github.com/react-component/motion/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/react-component/motion/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/react-component/motion/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/react-component/motion\n[david-url]: https://david-dm.org/react-component/motion\n[david-image]: https://david-dm.org/react-component/motion/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/react-component/motion?type=dev\n[david-dev-image]: https://david-dm.org/react-component/motion/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/rc-motion.svg?style=flat-square\n[download-url]: https://npmjs.org/package/rc-motion\n[bundlephobia-url]: https://bundlephobia.com/package/rc-motion\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-motion\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\nReact lifecycle controlled motion library.\n\n## Live Demo\n\nhttps://react-component.github.io/motion/\n\n## Install\n\n[![rc-motion](https://nodei.co/npm/rc-motion.png)](https://npmjs.org/package/rc-motion)\n\n## Example\n\n```js\nimport CSSMotion from 'rc-motion';\n\nexport default ({ visible }) =\u003e (\n  \u003cCSSMotion visible={visible} motionName=\"my-motion\"\u003e\n    {({ className, style }) =\u003e \u003cdiv className={className} style={style} /\u003e}\n  \u003c/CSSMotion\u003e\n);\n```\n\n## API\n\n### CSSMotion\n\n| Property | Type | Default | Description |\n| --- | --- | --- | --- |\n| motionName | string | - | Config motion name, will dynamic update when status changed |\n| visible | boolean | true | Trigger motion events |\n| motionAppear | boolean | true | Use motion when appear |\n| motionEnter | boolean | true | Use motion when enter |\n| motionLeave | boolean | true | Use motion when leave |\n| motionLeaveImmediately | boolean | - | Will trigger leave even on mount |\n| motionDeadline | number | - | Trigger motion status change even when motion event not fire |\n| removeOnLeave | boolean | true | Remove element when motion leave end |\n| leavedClassName | string | - | Set leaved element className |\n| onAppearStart | (HTMLElement, Event) =\u003e CSSProperties \\| void; | - | Trigger when appear start, return style will patch to element |\n| onEnterStart | (HTMLElement, Event) =\u003e CSSProperties \\| void; | - | Trigger when enter start, return style will patch to element |\n| onLeaveStart | (HTMLElement, Event) =\u003e CSSProperties \\| void; | - | Trigger when leave start, return style will patch to element |\n| onAppearActive | (HTMLElement, Event) =\u003e CSSProperties \\| void; | - | Trigger when appear active, return style will patch to element |\n| onEnterActive | (HTMLElement, Event) =\u003e CSSProperties \\| void; | - | Trigger when enter active, return style will patch to element |\n| onLeaveActive | (HTMLElement, Event) =\u003e CSSProperties \\| void; | - | Trigger when leave active, return style will patch to element |\n| onAppearEnd | (HTMLElement, Event) =\u003e boolean \\| void; | - | Trigger when appear end, will not finish when return false |\n| onEnterEnd | (HTMLElement, Event) =\u003e boolean \\| void; | - | Trigger when enter end, will not finish when return false |\n| onLeaveEnd | (HTMLElement, Event) =\u003e boolean \\| void; | - | Trigger when leave end, will not finish when return false |\n\n### CSSMotionList\n\nextends all the props from [CSSMotion](#CSSMotion)\n\n| Property  | Type                          | Default | Description       |\n| --------- | ----------------------------- | ------- | ----------------- |\n| keys      | React.Key[]                   | -       | Motion list keys  |\n| component | string \\| React.ComponentType | div     | wrapper component |\n\n## Development\n\n```\nnpm install\nnpm start\n```\n\n## License\n\nrc-motion is released under the MIT license.\n","funding_links":["https://github.com/sponsors/ant-design","https://opencollective.com/ant-design"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fmotion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-component%2Fmotion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-component%2Fmotion/lists"}