Skip to content

Commit da1d1a8

Browse files
committed
docs: update README
1 parent 98bf0af commit da1d1a8

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

README.md

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,60 @@
11
## Js-Css-Animations
22

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>
410

511
## Overview
612

713
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

Comments
 (0)