{"id":19412946,"url":"https://github.com/dielduarte/animate-css-styled-components","last_synced_at":"2025-04-05T23:10:07.148Z","repository":{"id":19951376,"uuid":"88372397","full_name":"dielduarte/animate-css-styled-components","owner":"dielduarte","description":"simple port of animate css for styled-components","archived":false,"fork":false,"pushed_at":"2022-12-08T18:19:56.000Z","size":15838,"stargazers_count":192,"open_issues_count":19,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T21:08:53.697Z","etag":null,"topics":["animatecss","react","react-component","styled-components"],"latest_commit_sha":null,"homepage":"https://dielduarte.github.io/animate-css-styled-components/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dielduarte.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}},"created_at":"2017-04-15T20:27:07.000Z","updated_at":"2025-03-25T04:37:08.000Z","dependencies_parsed_at":"2023-01-14T07:45:20.675Z","dependency_job_id":null,"html_url":"https://github.com/dielduarte/animate-css-styled-components","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fanimate-css-styled-components","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fanimate-css-styled-components/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fanimate-css-styled-components/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fanimate-css-styled-components/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dielduarte","download_url":"https://codeload.github.com/dielduarte/animate-css-styled-components/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411235,"owners_count":20934653,"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":["animatecss","react","react-component","styled-components"],"created_at":"2024-11-10T12:29:29.598Z","updated_at":"2025-04-05T23:10:07.106Z","avatar_url":"https://github.com/dielduarte.png","language":"HTML","readme":"# animate-css-styled-components\n\nsimple port of animate css for styled-components\n\n[![Build Status](https://travis-ci.org/dielduarte/animate-css-styled-components.svg?branch=master)](https://travis-ci.org/dielduarte/animate-css-styled-components)\n\n----------\n\n## instalation\n\ninstall animate-css-styled-components\n\n```\n[sudo] npm i --save animate-css-styled-components\n```\n\n## How to use\n\nimport animate-css-styled-components module calling global animations\n\n```jsx\nimport { Wobble, FadeIn, FadeOut } from 'animate-css-styled-components';\n```\n\n###### See how import specifics animations [here](https://github.com/dielduarte/animate-css-styled-components/tree/master/docs/specific-animations).\n\nNow, this animation is a component and you can encompassing the desired content within the component.\n\nExample:\n\n```jsx\n  \u003cWobble duration=\"0.8s\" delay=\"1s\"\u003e\n    \u003cCard\u003e\n      card content...\n    \u003c/Card\u003e\n  \u003c/Wobble\u003e\n```\n\n## Props\n\n - duration\n\t - prop for represent animation-duration\n\t - default `1s`\n - delay\n\t - prop for represent animation-delay\n\t - default `0s`\n - timingFunction\n\t - prop for represent  animation-timing-function\n\t - default `ease`\n - iterationCount\n\t - prop for represent animation-iteration-count\n\t - default `1`\n - direction\n\t - prop for represent animation-direction\n\t - default `normal`\n - fillMode\n\t - prop for represent animation-fill-mode\n\t - default `both`\n - playState\n\t - prop for represent animation-play-state\n\t - default `running`\n - display\n\t - prop for represent display css property\n\t - default `block`\n\n## Animate - HOC\n\nFor convenience you can use Animate HOC to use animations stacked, you could pass a unique component to `Animation` prop or an array of animations, example:\n\n```jsx\n  import Animate, {\n    Flash,\n    Bounce\n  } from 'animate-css-styled-components';\n\n  \u003cAnimate \n    Animation={[Flash, Bounce]} \n    duration=\"0.8s\" \n    delay=\"0.2s\"\u003e\n    \u003cCard\u003e\n      card content...\n    \u003c/Card\u003e\n  \u003c/Animate\u003e\n```\nIn this example that you could see [here](https://dielduarte.github.io/animate-css-styled-components/?selectedKind=Animate%20%28HOC%29\u0026selectedStory=Multiple%20Animations\u0026full=0\u0026down=1\u0026left=1\u0026panelRight=0\u0026downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel), the Bounce Animation will run after when Flash animation is finished, respecting the duration time + delay time, duration and delay are same for all animations, but you could pass diferents values to each animation prop, look:\n\n```jsx\n  import Animate, {\n    Flash,\n    Bounce,\n    FadeOut,\n    FadeIn\n  } from 'animate-css-styled-components';\n\n  \u003cAnimate \n    Animation={[Flash, Bounce, FadeOut, FadeIn]}\n    duration={[\"0.8s\", \"3s\", \"2s\", \"0.4s\"]}\n    delay={[\"0.2s\", \"0.1s\", \"0.5s\", \"1s\"]}\u003e\n    \u003cCard\u003e\n      card content...\n    \u003c/Card\u003e\n  \u003c/Animate\u003e\n\n```\n\nSee this example [here](https://dielduarte.github.io/animate-css-styled-components/?selectedKind=Animate%20%28HOC%29\u0026selectedStory=Multiple%20Animations%20with%20diferent%20times%20and%20delays\u0026full=0\u0026down=1\u0026left=1\u0026panelRight=0\u0026downPanel=kadirahq%2Fstorybook-addon-actions%2Factions-panel)\n\nDon't forget, you coul pass any [animations props](https://github.com/dielduarte/animate-css-styled-components#props) as single string if the value are same for all animations stacked or an array of values.\n\n## Examples - Storybook\n\nSee all examples [here](https://dielduarte.github.io/animate-css-styled-components/)\n\n## How to create custom styled animations\n\nYou can import BaseAnimation component and create your custom animation\n\nExample:\n\n```jsx\n  import { BaseAnimation } from 'animate-css-styled-components';\n\n  //create your custom animation\n  const SlideOutDownAnimation = keyframes`\n    from {\n      transform: translate3d(0, 0, 0);\n    }\n\n    to {\n      visibility: hidden;\n      transform: translate3d(0, 100%, 0);\n    }\n  `;\n\n  //extend BaseAnimation component and create\n  //your custom styled animation\n  const SlideOutDown = styled(BaseAnimation)`\n    animation-name: ${SlideOutDownAnimation};\n  `;\n\n  //export your custom styled animation  \n  export default SlideOutDown;\n```\n\nnow your animation is a styled-component and you can use this like any other styled-component,\npassing the all BaseAnimation [props](https://github.com/dielduarte/animate-css-styled-components#props).\n\nMade with love and styled-components!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fanimate-css-styled-components","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdielduarte%2Fanimate-css-styled-components","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fanimate-css-styled-components/lists"}