1.0.30 • Published 2 years ago

nei-animation v1.0.30

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

NEI Animation

A simple, light-weight text animation package to animate each word separately or animate html elements on scroll visibility. A perfect way to make any website look more professional and modern.

This package is in beta, new features and updates will come.

Image from Gyazo

Installation

You can either download the package files via GitHub or use the following command:

npm i nei-animation

Usage

Require the script and css file

// Require package
var NeiAnimation = require('nei-animation');

// Require css styling
import 'nei-animation/style.css'

Add data attributes

The main attribute is the data-nei attribute, here you define what animation you want upon visibility (see animation attributes):

<h1 data-nei="show-text">This sentence will be animated word for word.</h1>

Initiate the NeiAnimation class

<script>
let animate = new NeiAnimation({
    wordAppearSpeed: 70 // Speed in ms, optional
});
</script>

Attributes

All available attributes | Attribute | Example | Usage | |--------------|------------------------|---------------------------| | data-nei | data-nei="show-text" | Set the desired animation | | data-delay | data-nei-delay="200" | Set delay in miliseconds |

Animation attributes

These are the attribute values that can be used for the data-nei attribute:

AttributeExampleUsage
show-textdata-nei="show-text"Animates text word for word
fade-updata-nei="fade-left"Animates element from left
fade-leftdata-nei="fade-up"Animates element from down to up

Issues

Feel free to report any issues on GitHub here.

Discord

Join the discord server to ask for help, report fixes or suggest new features.

Discord

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago