README
Char Animator
Simple text animator: splits strings text into single chars and applies animations to each one when the cursor passes over them.
How to...
Installation
$ npm i -S char-animator
Import package
To use, you'll need to import charAnimator
into your js file.
import charAnimator from './node_modules/char-animator/dist/char-animator.js';
Use
charAnimator(selector, animation, text-color, text-stroke);
Parameters
Param | Type | Description | Default |
---|---|---|---|
selector | string | Valid CSS selector: class | id | tag element which the animation will be applied |
Required |
animation | string | Options: rubberBand | bounce | pulse | tada | swing |
Required |
text-color | string | Color format: #hex | rgb | rgba | hsl | hsla changes the font color when the cursor passes over the chars |
Optional |
text-stroke | string | Color format: #hex | rgb | rgba | hsl | hsla changes the stroke color when the cursor passes over the chars |
Optional |
License
MIT