|
1 | 1 | ## Js-Css-Animations |
2 | 2 |
|
3 | | -Work in progress.... |
| 3 | +<p align="center"> |
| 4 | +...Work in progress.... |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | +<img alt="Cat typing furiously" src="https://i.giphy.com/media/uzglgIsyY1Cgg/giphy.webp" width="150" /> |
| 9 | +</p> |
4 | 10 |
|
5 | 11 | ## Overview |
6 | 12 |
|
7 | 13 | I'm creating this library to practice plain javascript and also because I'm always using |
8 | | -CSS animations, so I thought: "why not make my own animation library?" |
| 14 | +CSS animations in my projects, so I thought: "why not make my own animation library?" 😁 |
| 15 | + |
| 16 | +It provides an API to easily set and customize CSS animations using only Javascript. |
| 17 | + |
| 18 | +## Development Stage |
| 19 | + |
| 20 | +Although the functionalities are all already working, I'm still making some changes, mainly to improve overall performance. |
| 21 | + |
| 22 | +## How to use it |
| 23 | + |
| 24 | +1. Copy the './_js-css-animations/_' directory to your project's folder |
| 25 | + |
| 26 | +2. Link the **js-animations.css** in your HTML file: |
| 27 | + |
| 28 | +```html |
| 29 | +<link rel="stylesheet" href="./src/js-css-animations/js-animations.css" /> |
| 30 | +``` |
| 31 | + |
| 32 | +3. Import the **js-css-animations.js** in your javascript file |
| 33 | + |
| 34 | +```js |
| 35 | +import jsCssAnimations from './js-css-animations/js-css-animations.js'; |
| 36 | +``` |
| 37 | + |
| 38 | +4. All ready and set! |
| 39 | + |
| 40 | +```js |
| 41 | +// Example of usage |
| 42 | +jsCssAnimations.init.slideUp({ |
| 43 | + trigger: '.btn--slide-up', |
| 44 | + targetSelector: '.slide-this-content' |
| 45 | + staggerDelay: 500, |
| 46 | + duration: '1s', |
| 47 | + start: () => { |
| 48 | + jsCssAnimations.toggle('#anchor img', 'rotateDownCCW', 'rotateUp'); |
| 49 | + }, |
| 50 | +}); |
| 51 | +``` |
| 52 | + |
| 53 | +## Documentation |
| 54 | + |
| 55 | +I'm working hard to provide a complete documentation for the library, with examples to cover all the functionalities. |
| 56 | + |
| 57 | +You can access the documentation and some usage examples [here](https://js-css-animations.vercel.app) . |
| 58 | + |
| 59 | +The docs were generated with jsDoc and [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown) and the documentation page is built with [vitepress](https://github.com/vuejs/vitepress). |
| 60 | +Thanks to vitepress, the [Examples section](https://js-css-animations.vercel.app/examples/) is reactive by using Vue components inside the markdown files, so you can play around with the examples and test different values for the animations options. 😉 |
0 commit comments