{"id":19082368,"url":"https://github.com/brightleaf/animate.scss","last_synced_at":"2025-04-30T08:24:26.272Z","repository":{"id":36349865,"uuid":"223821126","full_name":"brightleaf/animate.scss","owner":"brightleaf","description":"SCSS version of Animate.css","archived":false,"fork":false,"pushed_at":"2022-12-10T10:03:07.000Z","size":502,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T23:59:36.107Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"chancestrickland/animate.scss","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brightleaf.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}},"created_at":"2019-11-24T22:42:23.000Z","updated_at":"2020-10-20T18:49:53.000Z","dependencies_parsed_at":"2023-01-17T01:30:51.388Z","dependency_job_id":null,"html_url":"https://github.com/brightleaf/animate.scss","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/brightleaf%2Fanimate.scss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightleaf%2Fanimate.scss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightleaf%2Fanimate.scss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightleaf%2Fanimate.scss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightleaf","download_url":"https://codeload.github.com/brightleaf/animate.scss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251667422,"owners_count":21624496,"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-11-09T02:43:04.395Z","updated_at":"2025-04-30T08:24:26.237Z","avatar_url":"https://github.com/brightleaf.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Animate.scss\n\n_Just-add-water (s)CSS animation. A sass port of [Animate.css](https://daneden.github.io/animate.css/)_\n\n`animate.scss` is a bunch of cool, fun, and cross-browser animations for you to use in your projects. Great for emphasis, home pages, sliders, and general just-add-water-awesomeness.\n\n## Installation\n\nInstall via npm:\n\n```bash\n$ npm i @brightleaf/animate.scss\n```\n\nor yarn:\n\n```bash\n$ yarn add @brightleaf/animate.scss\n```\n\n## Usage\n\nTo use animate.scss in your website, you can either 1) simply drop the compiled stylesheet into your document's `\u003chead\u003e`, or you can import the sass files into your project directly. From there you can add the class `animated` to an element, along with any of the animation names. That's it! You've got a CSS animated element. Super!\n\n```html\n\u003chead\u003e\n  \u003clink rel=\"stylesheet\" href=\"animate.min.css\" /\u003e\n\u003c/head\u003e\n```\n\nIf you are importing sass directly, you have two options. You can pull in the package as a whole -- including all animations -- by importing `animate.scss` from the package root:\n\n```scss\n@import \"~@brightleaf/animate.scss/animate\";\n```\n\n...or you can pull in animations (or animation groups) as you need them. Using this option, you'll also need to import the `settings` and `classes` files independently:\n\n```scss\n@import \"~@brightleaf/animate.scss/source/settings\"; // settings first!\n@import \"~@brightleaf/animate.scss/source/flippers\"; // animation group!\n@import \"~@brightleaf/animate.scss/source/lightspeed/lightSpeedIn\"; // individual animation!\n@import \"~@brightleaf/animate.scss/source/classes\"; // classes!\n```\n\n### Animations\n\nTo animate an element, add the class `animated` to an element. You can include the class `infinite` for an infinite loop. Finally you need to add one of the following classes to the element:\n\n| Class Name        |                    |                     |                      |\n| ----------------- | ------------------ | ------------------- | -------------------- |\n| `bounce`          | `flash`            | `pulse`             | `rubberBand`         |\n| `shake`           | `headShake`        | `swing`             | `tada`               |\n| `wobble`          | `jello`            | `bounceIn`          | `bounceInDown`       |\n| `bounceInLeft`    | `bounceInRight`    | `bounceInUp`        | `bounceOut`          |\n| `bounceOutDown`   | `bounceOutLeft`    | `bounceOutRight`    | `bounceOutUp`        |\n| `fadeIn`          | `fadeInDown`       | `fadeInDownBig`     | `fadeInLeft`         |\n| `fadeInLeftBig`   | `fadeInRight`      | `fadeInRightBig`    | `fadeInUp`           |\n| `fadeInUpBig`     | `fadeOut`          | `fadeOutDown`       | `fadeOutDownBig`     |\n| `fadeOutLeft`     | `fadeOutLeftBig`   | `fadeOutRight`      | `fadeOutRightBig`    |\n| `fadeOutUp`       | `fadeOutUpBig`     | `flipInX`           | `flipInY`            |\n| `flipOutX`        | `flipOutY`         | `lightSpeedIn`      | `lightSpeedOut`      |\n| `rotateIn`        | `rotateInDownLeft` | `rotateInDownRight` | `rotateInUpLeft`     |\n| `rotateInUpRight` | `rotateOut`        | `rotateOutDownLeft` | `rotateOutDownRight` |\n| `rotateOutUpLeft` | `rotateOutUpRight` | `hinge`             | `jackInTheBox`       |\n| `rollIn`          | `rollOut`          | `zoomIn`            | `zoomInDown`         |\n| `zoomInLeft`      | `zoomInRight`      | `zoomInUp`          | `zoomOut`            |\n| `zoomOutDown`     | `zoomOutLeft`      | `zoomOutRight`      | `zoomOutUp`          |\n| `slideInDown`     | `slideInLeft`      | `slideInRight`      | `slideInUp`          |\n| `slideOutDown`    | `slideOutLeft`     | `slideOutRight`     | `slideOutUp`         |\n| `heartBeat`       |\n\nFull example:\n\n```html\n\u003ch1 class=\"animated infinite bounce delay-2s\"\u003eExample\u003c/h1\u003e\n```\n\n\u003c!--\n[Check out all the animations here!](https://daneden.github.io/animate.scss/)\n --\u003e\n\nIt's possible to change the duration of your animations, add a delay or change the number of times that it plays:\n\n```css\n.yourElement {\n  animation-duration: 3s;\n  animation-delay: 2s;\n  animation-iteration-count: infinite;\n}\n```\n\n## Usage with jQuery\n\nYou can do a whole bunch of other stuff with animate.scss when you combine it with jQuery. A simple example:\n\n```javascript\n$(\"#yourElement\").addClass(\"animated bounceOutLeft\");\n```\n\nYou can also detect when an animation ends:\n\n\u003c!--\nBefore you make changes to this file, you should know that $('#yourElement').one() is *NOT A TYPO*\n\nhttp://api.jquery.com/one/\n--\u003e\n\n```javascript\n// See https://github.com/daneden/animate.scss/issues/644\nvar animationEnd = (function(el) {\n  var animations = {\n    animation: \"animationend\",\n    OAnimation: \"oAnimationEnd\",\n    MozAnimation: \"mozAnimationEnd\",\n    WebkitAnimation: \"webkitAnimationEnd\"\n  };\n\n  for (var t in animations) {\n    if (el.style[t] !== undefined) {\n      return animations[t];\n    }\n  }\n})(document.createElement(\"div\"));\n\n$(\"#yourElement\").one(animationEnd, doSomething);\n```\n\n[View a video tutorial](https://www.youtube.com/watch?v=CBQGl6zokMs) on how to use Animate.scss with jQuery here.\n\n**Note:** `jQuery.one()` is used when you want to execute the event handler at most _once_. More information [here](http://api.jquery.com/one/).\n\nIt's possible to extend jQuery and add a function that does it all for you:\n\n```javascript\n$.fn.extend({\n  animateCss: function(animationName, callback) {\n    var animationEnd = (function(el) {\n      var animations = {\n        animation: \"animationend\",\n        OAnimation: \"oAnimationEnd\",\n        MozAnimation: \"mozAnimationEnd\",\n        WebkitAnimation: \"webkitAnimationEnd\"\n      };\n\n      for (var t in animations) {\n        if (el.style[t] !== undefined) {\n          return animations[t];\n        }\n      }\n    })(document.createElement(\"div\"));\n\n    this.addClass(\"animated \" + animationName).one(animationEnd, function() {\n      $(this).removeClass(\"animated \" + animationName);\n\n      if (typeof callback === \"function\") callback();\n    });\n\n    return this;\n  }\n});\n```\n\nAnd use it like this:\n\n```javascript\n$(\"#yourElement\").animateCss(\"bounce\");\nor;\n$(\"#yourElement\").animateCss(\"bounce\", function() {\n  // Do something after animation\n});\n```\n\n## Setting _Delay_ and _Speed_\n\n### Delay Class\n\nIt's possible to add delays directly on the element's class attribute, just like this:\n\n```html\n\u003cdiv class=\"animated bounce delay-2s\"\u003eExample\u003c/div\u003e\n```\n\nThese class names are generated by the `$animate-scss-second-delays` list variable. You can override this variable to create classes for your own needs as such:\n\n```scss\n$animate-scss-second-delays: 1, 2, 3, 4, 5, 6, 7; // go on to your heart's content!\n```\n\n| List Item | Class Name | Delay Time |\n| --------- | ---------- | ---------- |\n| 2         | `delay-2s` | `2s`       |\n| 3         | `delay-3s` | `3s`       |\n| 4         | `delay-4s` | `4s`       |\n| 5         | `delay-5s` | `5s`       |\n\n### Speed Classes\n\nThese class names are generated by the `$animate-scss-durations` map variable. It's possible to control the speed of the animation by adding these classes, as a sample below:\n\n```html\n\u003cdiv class=\"animated bounce faster\"\u003eExample\u003c/div\u003e\n```\n\nYou can override these values by creating your own map -- and even add custom speeds -- as demonstrated below:\n\n```scss\n$animate-scss-durations: (\n  fast: 800ms,\n  faster: 500ms,\n  fassssssssssst: 200ms,\n  // custom speed!\n    slow: 2s,\n  slower: 3s\n);\n```\n\n| Class Name/Map Key | Default Speed |\n| ------------------ | ------------- |\n| `slow`             | `2s`          |\n| `slower`           | `3s`          |\n| `fast`             | `800ms`       |\n| `faster`           | `500ms`       |\n\n\u003e **Note**: The `animated` class has a default speed of `1s`. If you need custom duration, set a new value for the `$animate-scss-default-duration` variable.\n\n## Accessibility\n\nAnimate.scss supports the [`prefers-reduced-motion` media query](https://webkit.org/blog/7551/responsive-design-for-motion/) so that users with motion sensitivity can opt out of animations. On supported platforms (currently only OSX Safari and iOS Safari), users can select \"reduce motion\" on their operating system preferences and it will turn off CSS transitions for them without any further work required.\n\n## License\n\nAnimate.scss is licensed under the MIT license. (http://opensource.org/licenses/MIT)\n\n## Contributing\n\nPull requests are the way to go here. We only have two rules for submitting a pull request: match the naming convention (camelCase, categorised [fades, bounces, etc]) and let us see a demo of submitted animations in a [pen](http://codepen.io). That **last one is important**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightleaf%2Fanimate.scss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrightleaf%2Fanimate.scss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrightleaf%2Fanimate.scss/lists"}