{"id":15161086,"url":"https://github.com/mleko/react-animate-hoc","last_synced_at":"2026-01-20T05:33:03.089Z","repository":{"id":65372907,"uuid":"78467413","full_name":"mleko/react-animate-hoc","owner":"mleko","description":"React animation/easing higher order component","archived":false,"fork":false,"pushed_at":"2017-03-19T10:17:20.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T08:34:39.345Z","etag":null,"topics":["animation","decorator","easing","higher-order-component","hoc","react","transition","typescript"],"latest_commit_sha":null,"homepage":"https://mleko.gitlab.io/react-animate-hoc/","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/mleko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-09T20:45:30.000Z","updated_at":"2017-03-19T10:01:19.000Z","dependencies_parsed_at":"2023-01-19T23:35:19.460Z","dependency_job_id":null,"html_url":"https://github.com/mleko/react-animate-hoc","commit_stats":null,"previous_names":["mleko/react-easing"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mleko%2Freact-animate-hoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mleko%2Freact-animate-hoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mleko%2Freact-animate-hoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mleko%2Freact-animate-hoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mleko","download_url":"https://codeload.github.com/mleko/react-animate-hoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737786,"owners_count":20987721,"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","decorator","easing","higher-order-component","hoc","react","transition","typescript"],"created_at":"2024-09-27T00:00:40.205Z","updated_at":"2026-01-20T05:32:58.071Z","avatar_url":"https://github.com/mleko.png","language":"TypeScript","readme":"# react-animate-hoc\n\u003e Higher-order component easing/animating prop changes for React\n\n[![NPM](https://nodei.co/npm/react-animate-hoc.png?compact=true)](https://nodei.co/npm/react-animate-hoc/)\n\n## Demo\n\nLive demo is available https://mleko.gitlab.io/react-animate-hoc/\n\n## Installation\n\nLibrary can be installed via [npm](https://www.npmjs.com/package/react-animate-hoc).\n\n```\n$ npm install react-animate-hoc\n```\n\n## Usage\nComponent you wish to animate\n```\nexport function ColorBox(p: RgbColor): JSX.Element {\n\tlet style = {\n\t\theight: 50,\n\t\twidth: 50,\n\t\tbackgroundColor: `rgb(${p.r.toFixed()},${p.g.toFixed()},${p.b.toFixed()}`,\n\t\tborder: \"1px black solid\",\n\t\tdisplay: \"inline-block\",\n\t\tmargin: 3\n\t};\n\treturn (\u003cdiv style={style}/\u003e);\n}\n```\n\nto animate property transition wrap component in `animate` HOC\n```\nexport const AnimatedColorBox = animate()(ColorBox)\n```\n\nor annotate new component\n```\n@animate()\nexport class AnnotatedColorBox extends React.Component\u003cRgbColor, any\u003e {\n\tpublic render(): JSX.Element {\n\t\treturn (\u003cColorBox {...this.props}/\u003e);\n\t}\n}\n```\n\nNow you can use animated components just like regular one\n```\n    \u003cColorBox {...this.state}/\u003e\n    \u003cAnimatedColorBox {...this.state}/\u003e\n    \u003cAnnotatedColorBox {...this.state}/\u003e\n```\n## Running examples\n\n  *Have `node.js` and `npm` installed.*\n\n 1. Clone this repo.\n 2. Run `npm install` to get all dependencies.\n 3. Run `npm start` to run Webpack dev server.\n\n\n### [License (MIT)](LICENSE.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmleko%2Freact-animate-hoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmleko%2Freact-animate-hoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmleko%2Freact-animate-hoc/lists"}