{"id":20129362,"url":"https://github.com/ryanmorr/remotion","last_synced_at":"2025-04-09T16:09:30.639Z","repository":{"id":43419066,"uuid":"283859401","full_name":"ryanmorr/remotion","owner":"ryanmorr","description":"Animate elements before removing them from the DOM","archived":false,"fork":false,"pushed_at":"2025-02-19T14:24:23.000Z","size":216,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T16:09:22.773Z","etag":null,"topics":["animation","dom","javascript","remove-elements","transition"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanmorr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-07-30T19:22:49.000Z","updated_at":"2024-11-16T19:36:45.000Z","dependencies_parsed_at":"2024-11-30T13:31:11.301Z","dependency_job_id":null,"html_url":"https://github.com/ryanmorr/remotion","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.0357142857142857,"last_synced_commit":"93bc9d3ea457e60b0eb9cb1aa1a80d3b99da416b"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmorr%2Fremotion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmorr%2Fremotion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmorr%2Fremotion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmorr%2Fremotion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanmorr","download_url":"https://codeload.github.com/ryanmorr/remotion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065283,"owners_count":21041871,"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":["animation","dom","javascript","remove-elements","transition"],"created_at":"2024-11-13T20:33:53.652Z","updated_at":"2025-04-09T16:09:30.612Z","avatar_url":"https://github.com/ryanmorr.png","language":"JavaScript","readme":"# remotion\n\n[![Version Badge][version-image]][project-url]\n[![License][license-image]][license-url]\n[![Build Status][build-image]][build-url]\n\n\u003e Animate elements before removing them from the DOM\n\n## Install\n\nDownload the [CJS](https://github.com/ryanmorr/remotion/raw/master/dist/cjs/remotion.js), [ESM](https://github.com/ryanmorr/remotion/raw/master/dist/esm/remotion.js), [UMD](https://github.com/ryanmorr/remotion/raw/master/dist/umd/remotion.js) versions or install via NPM:\n\n```sh\nnpm install @ryanmorr/remotion\n```\n\n## Usage\n\nImport the library:\n\n```javascript\nimport remotion from '@ryanmorr/remotion';\n```\n\nProvide an element, nodelist, or selector string as the first argument and a CSS class name as the second argument that triggers a CSS transition or keyframe animation. It returns a promise that is resolved when the transition/animation is complete and the element has been removed from the DOM:\n\n```javascript\nremotion(element, 'fade-out').then(() =\u003e console.log('element removed'));\n```\n\nSupports a function as the second argument that is provided the element reference and returns the class name:\n\n```javascript\nremotion('.item', (element) =\u003e 'fade-out');\n```\n\nIf the function returns a promise, it can now be used to fully customize the removal process. You can perform a custom animation, execute side effects, and/or explicitly remove the element from the DOM yourself, then simply resolve the promise when your done:\n\n```javascript\nremotion(nodelist, (element) =\u003e {\n    return new Promise((resolve) =\u003e {\n        fadeOut(element).then(() =\u003e {\n            executeSideEffect(element);\n            element.remove();\n            resolve();\n        });\n    });\n});\n```\n\n## License\n\nThis project is dedicated to the public domain as described by the [Unlicense](http://unlicense.org/).\n\n[project-url]: https://github.com/ryanmorr/remotion\n[version-image]: https://img.shields.io/github/package-json/v/ryanmorr/remotion?color=blue\u0026style=flat-square\n[build-url]: https://github.com/ryanmorr/remotion/actions\n[build-image]: https://img.shields.io/github/actions/workflow/status/ryanmorr/remotion/node.js.yml?style=flat-square\n[license-image]: https://img.shields.io/github/license/ryanmorr/remotion?color=blue\u0026style=flat-square\n[license-url]: UNLICENSE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanmorr%2Fremotion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanmorr%2Fremotion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanmorr%2Fremotion/lists"}