{"id":13468692,"url":"https://github.com/berzniz/react-overdrive","last_synced_at":"2025-05-14T14:04:13.050Z","repository":{"id":18356140,"uuid":"84078289","full_name":"berzniz/react-overdrive","owner":"berzniz","description":"Super easy magic-move transitions for React apps","archived":false,"fork":false,"pushed_at":"2022-12-08T22:17:41.000Z","size":6385,"stargazers_count":2967,"open_issues_count":23,"forks_count":84,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-11T06:12:37.171Z","etag":null,"topics":["animations","magic-move","react","router","transitions"],"latest_commit_sha":null,"homepage":"https://react-overdrive.now.sh","language":"JavaScript","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/berzniz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-03-06T13:47:55.000Z","updated_at":"2025-03-23T14:26:44.000Z","dependencies_parsed_at":"2023-01-13T21:30:24.468Z","dependency_job_id":null,"html_url":"https://github.com/berzniz/react-overdrive","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berzniz%2Freact-overdrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berzniz%2Freact-overdrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berzniz%2Freact-overdrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berzniz%2Freact-overdrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berzniz","download_url":"https://codeload.github.com/berzniz/react-overdrive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159168,"owners_count":22024558,"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":["animations","magic-move","react","router","transitions"],"created_at":"2024-07-31T15:01:16.828Z","updated_at":"2025-05-14T14:04:12.999Z","avatar_url":"https://github.com/berzniz.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# react-overdrive\nSuper easy magic-move transitions for React apps.\n\n## Demos\n\n1. [Page transitions](https://overdrive-demo.now.sh)\n\n![Overdrive Demo](assets/overdrive.gif \"Demo\")\n\n2. [Image Gallery with next.js](https://nextgram-overdrive.now.sh)\n\n![Overdrive Demo](assets/nextgram-overdrive.gif \"Demo\")\n\n3. [With React Router](https://overdrive-rr4.now.sh)\n\n![Overdrive Demo](assets/rr-overdrive.gif \"Demo\")\n\n## Install\n\n```\n$ npm install react-overdrive --save\n```\n\n## Usage\n\n### Example with routing\n\nWrap any element (not just images) in a `\u003cOverdrive id=\"\"\u003e\u003c/Overdrive\u003e` component. Add the same `id` to create a transition between the elements.\n\nOn `page1.js`:\n```js\nimport Overdrive from 'react-overdrive'\n\nconst pageA = (props) =\u003e (\n  \u003cdiv\u003e\n    \u003ch1\u003ePage A\u003c/h1\u003e\n    \u003cOverdrive id=\"bender-to-big-fry\"\u003e\n      \u003cimg src=\"bender.png\" width=\"100\" height=\"100\"/\u003e\n    \u003c/Overdrive\u003e\n  \u003c/div\u003e\n);\n```\n\nOn `page2.js`:\n```js\nimport Overdrive from 'react-overdrive'\n\nconst pageB = (props) =\u003e (\n  \u003cdiv\u003e\n    \u003ch1\u003ePage B\u003c/h1\u003e\n    \u003cOverdrive id=\"bender-to-big-fry\"\u003e\n      \u003cimg src=\"fry.png\" width=\"300\" height=\"300\"/\u003e\n    \u003c/Overdrive\u003e\n  \u003c/div\u003e\n);\n```\n\nNow route between the pages.\n\n### Example without routing\n\nOn `page.js`:\n```js\nimport Overdrive from 'react-overdrive'\n\nconst page = (props) =\u003e (\n  \u003cdiv\u003e\n    {props.loading \u0026\u0026 \u003cOverdrive id=\"content\"\u003e\u003cLoader/\u003e\u003c/Overdrive\u003e}\n    {!props.loading \u0026\u0026 \u003cOverdrive id=\"content\"\u003e\u003cContent/\u003e\u003c/Overdrive\u003e}\n  \u003c/div\u003e\n);\n```\n\n## API\n\n| Prop           | Description                                                                                                                  | Default Value |\n|----------------|------------------------------------------------------------------------------------------------------------------------------|---------------|\n| id             | Required. A unique string to identify the component.                                                                         |               |\n| element        | Wrapping element type.                                                                                                       | 'div'         |\n| duration       | Animation duration (in milliseconds).                                                                                        | 200           |\n| easing         | Animation easing function.                                                                                                   | ''            |\n| animationDelay | Add delay of calculating the mounted component position. Setting to `1` usually helps avoiding issues with window scrolling. | null          |\n| onAnimationEnd | Event dispatched when the animation has finished.                                                                            | null          |\n\n## How does it work?\n\nA transition is made when an `\u003cOverdrive id=\"example\"/\u003e` component is unmounted and another `\u003cOverdrive id=\"example\"/\u003e` is mounted not later than 100ms.\n\nThe transition is made by cloning the unmounted and mounted components, adding them with `absolute` position and CSS transformed from the source to the target position.\n\n## Sponsors\n\nThanks to the following companies for generously providing their services/products to help improve this project:\n\n\u003cimg src=\"assets/browserstack-logo.png\" width=\"200\"\u003e\n\nThanks to [BrowserStack](https://browserstack.com/) for providing cross-browser testing.\n\n## Who made this?\n\nTal Bereznitskey. Find me on Twitter as [@ketacode](https://twitter.com/ketacode).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberzniz%2Freact-overdrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberzniz%2Freact-overdrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberzniz%2Freact-overdrive/lists"}