{"id":15047092,"url":"https://github.com/rcaferati/wac","last_synced_at":"2025-12-16T13:04:43.604Z","repository":{"id":32948997,"uuid":"134981013","full_name":"rcaferati/wac","owner":"rcaferati","description":"CSS controlled animations with transitionEnd, onTransitionEnd, animationend, onAnimationEnd events and frame throwing. Tiny javascript library with cross-browser methods to handle css animation/transition callbacks and event loop frame throwing.  📚🖥️📱","archived":false,"fork":false,"pushed_at":"2022-10-22T10:55:00.000Z","size":968,"stargazers_count":59,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-05T01:38:38.856Z","etag":null,"topics":["animation-library","css","css-animations","css-transitions","css3","javascript-animation-library","javascript-library","react"],"latest_commit_sha":null,"homepage":"https://web-animation.caferati.me","language":"TypeScript","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/rcaferati.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":"2018-05-26T17:20:11.000Z","updated_at":"2024-05-26T19:28:35.000Z","dependencies_parsed_at":"2022-08-25T17:13:11.190Z","dependency_job_id":null,"html_url":"https://github.com/rcaferati/wac","commit_stats":null,"previous_names":["rcaferati/web-animation-club"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rcaferati/wac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Fwac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Fwac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Fwac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Fwac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcaferati","download_url":"https://codeload.github.com/rcaferati/wac/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcaferati%2Fwac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27764777,"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","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-library","css","css-animations","css-transitions","css3","javascript-animation-library","javascript-library","react"],"created_at":"2024-09-24T20:54:21.578Z","updated_at":"2025-12-16T13:04:43.573Z","avatar_url":"https://github.com/rcaferati.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WAC — CSS transition and animation controls\n\n[![Travis](https://img.shields.io/travis/rcaferati/web-animation-club/master.svg)](https://travis-ci.org/rcaferati/web-animation-club) ![NPM](https://img.shields.io/npm/v/web-animation-club.svg)\n\nTiny `~0.8kb` javascript library with cross-browser methods to handle CSS `ontransitionend` and `onanimationend` event — AKA CSS animation and transition callbacks.\n\n## Quick usage\nQuick usage example of the `onceTransitionEnd` wac method.\n```javascript\nwac.onceTransitionEnd(element).then(function(event) {\n  // ... do something\n});\n```\n\n## Live Demo\nAccess the demo at [https://web-animation.caferati.me](https://web-animation.caferati.me)\n\n[\u003cimg width=\"600\" alt=\"react-awesome-slider demo\" src=\"https://github.com/rcaferati/web-animation-club/blob/master/demo/assets/wac-video.gif?raw=true\"\u003e](https://web-animation.caferati.me)\n\n## Installation\n\n#### NPM Registry\nFrom the `NPM registry` using npm or yarn just install `@rcaferati/wac` package.\n```\nnpm install --save @rcaferati/wac\n```\nor\n```\nyarn add --save @rcaferati/wac\n```\n\n## Basic Usage\nFor all the following examples please consider the following HTML markup.\n```html\n\u003cstyle\u003e\n  .animated {\n    transition: transform 0.4s linear;\n  }\n  .move {\n    transform: translateX(100px);\n  }\n\u003c/style\u003e\n\u003cdiv class=\"container\"\u003e\n  \u003cdiv class=\"box\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n#### HTML with ES5\n```html\n\u003cscript src=\"/path/to/wac.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var box = document.querySelector('.box');\n  \n  box.classList.add('animated');\n  box.classList.add('move');\n  \n  onceTransitionEnd(box).then(function(event) {\n    // ... do something\n  });\n\u003c/script\u003e\n```\n#### Javascript ES6\n```jsx\n  import { onceTransitionEnd } from '@rcaferati/wac';\n\n  const element = document.querySelector('.box');\n  \n  // here we're just simulating the addition of a class with some animation/transition\n  element.classList.add('animated');\n  element.classList.add('move');\n  \n  // if you are using the transition css property\n  onceTransitionEnd(element).then((event) =\u003e {\n    // ... do something\n  });\n```\n\n## WAC methods\n\n#### onceTransitionEnd(element, options)\n- `element` \u003c[HTML element]\u003e html element on which the transition is happening\n- `options` \u003c[object]\u003e\n  - `tolerance` \u003c[integer]\u003e used in case of pseudo-element animations\n  - `property` \u003c[string]\u003e animated property to check before calling the callback\n\n#### onceAnimationEnd(element, options)\n- `element` \u003c[HTML element]\u003e html element on which the transition is happening\n- `options` \u003c[object]\u003e\n  - `tolerance` \u003c[integer]\u003e used in case of pseudo-element animations\n  - `property` \u003c[string]\u003e animated property to check before calling the callback\n  \n#### beforeFutureCssLayout(frames, callback)\n- `frames` \u003c[integer]\u003e Number of frames to skip\n- `callback` \u003c[function]\u003e function called after the skipped frames\n\n#### beforeNextCssLayout(callback)\n- `callback` \u003c[function]\u003e function called after the skipped frame\n\n## Author\n#### Rafael Caferati\n+ Checkout my \u003ca href=\"https://caferati.me\" title=\"Full-Stack Web Developer, UI/UX Javascript Specialist\" target=\"_blank\"\u003ePortfolio Website\u003c/a\u003e\n+ Follow on \u003ca href=\"https://github.com/rcaferati\" title=\"rcaferati github profile\" target=\"_blank\"\u003eGitHub\u003c/a\u003e\n+ Connect on \u003ca href=\"https://linkedin.com/in/rcaferati\" title=\"rcaferati linkedin profile\" target=\"_blank\"\u003eLinkedIn\u003c/a\u003e\n\n## License\n\nMIT. Copyright (c) 2018 Rafael Caferati.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcaferati%2Fwac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcaferati%2Fwac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcaferati%2Fwac/lists"}