{"id":23442254,"url":"https://github.com/teamwertarbyte/react-hero-animation","last_synced_at":"2025-06-21T16:34:14.960Z","repository":{"id":66339178,"uuid":"79658776","full_name":"TeamWertarbyte/react-hero-animation","owner":"TeamWertarbyte","description":"A small react library for hero animations.","archived":false,"fork":false,"pushed_at":"2017-04-15T12:53:40.000Z","size":218,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T16:12:21.278Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/TeamWertarbyte.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-21T16:50:29.000Z","updated_at":"2023-05-17T14:39:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"af2484e9-d01d-49fd-a2f7-bedae51597c7","html_url":"https://github.com/TeamWertarbyte/react-hero-animation","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"d1adae7c321184da9a9f82a2c80962a73a80a3a8"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Freact-hero-animation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Freact-hero-animation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Freact-hero-animation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TeamWertarbyte%2Freact-hero-animation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TeamWertarbyte","download_url":"https://codeload.github.com/TeamWertarbyte/react-hero-animation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703198,"owners_count":21148118,"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-12-23T17:29:03.841Z","updated_at":"2025-04-13T11:11:09.451Z","avatar_url":"https://github.com/TeamWertarbyte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-hero-animation\nWith this library, you can easily create Hero animations in your React apps. A demo is available [here][gh-pages].\n\n## Usage\nThe `HeroAnimationProvider` needs to wrap all components. It tracks the registered heroes and which one to animate.\n\nAlso, every animatable element (the heroes) need to be wrapped with a `Hero` component.\n\n```jsx\nimport { HeroAnimationProvider, Hero } from 'react-hero-animation'\n\n\u003cHeroAnimationProvider\u003e\n  \u003cHero id='hero-1' show={true}\u003e\n    \u003cYourChildComponent /\u003e\n  \u003c/Hero\u003e\n  \u003cHero id='hero-1' show={false}\u003e\n    \u003cYourChildComponent /\u003e    \n  \u003c/Hero\u003e\n\u003c/HeroAnimationProvider\u003e\n```\n\n## `Hero` properties\n| Name | Type | Default | Description |\n| --- | --- | --- | --- |\n| children* | `element` | | One child element, must be either a dom element or a `React.Component` instance (it gets a `ref`, so pure functional components are not supported). |\n| id* | `string` | | A unique ID of this hero. Every hero with the same ID is treated as one animatable element and only one of it can be visible at once. |\n| resize | `bool` | `false` | If true, the wrapped component will be resized (using `width` and `height`) instead of scaled. |\n| show | `bool` | `false` | Displays the wrapped component, using a hero animation. Only one `Hero` can be displayed at a time. |\n\n## License\nThe files included in this repository are licensed under the MIT license.\n\n## Related projects\nThere is another project, [Pajn/react-hero-transition][react-hero-transition], that provides almost the same functionality (except for `resize`) and might be more flexible. It was published four days before this library, we just found it when we were about to publish this one.\n\n[gh-pages]: https://teamwertarbyte.github.io/react-hero-animation/\n[react-hero-transition]: https://github.com/Pajn/react-hero-transition","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamwertarbyte%2Freact-hero-animation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteamwertarbyte%2Freact-hero-animation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteamwertarbyte%2Freact-hero-animation/lists"}