1.1.2 • Published 2 years ago

char-animation v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

How to...

Installation

$ npm i -S char-animation

Import package

To use, you'll need to import charAnimation into your js file.

import charAnimation from './node_modules/char-animation/dist/char-animation.js';

Use

charAnimation({selector, animation, color, stroke});

Parameters

The function receive an object with the follow parameters:

ParamTypeDescriptionDefault
selectorstringValid CSS selector:class | id | tagelement which the animation will be appliedRequired
animationstringOptions:rubberBand | bounce | pulse | tada | swingRequired
colorstringColor format: #hex | rgb | rgba | hsl | hslachanges the font color when the cursor passes over the charsOptional
strokestringColor format: #hex | rgb | rgba | hsl | hslachanges the stroke color when the cursor passes over the charsOptional

Example

charAnimation(
  {
    selector: "h1", 
    animation: "rubberBand",  
    color: "green", 
    stroke: "blue"
  }
);

License

MIT

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.1.2 - 2022-07-07

Removed

  • checkers for selector and style declaration

Fixed

  • font-size set to inherit for singleChar elements

Security

  • fix critical vulnerability on minist node module
1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago