1.0.1 • Published 3 years ago

@sumedia-sven/apex-animate v1.0.1

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

Apex Animate npm (scoped)

Apex Animate

Trigger high-performance animations with a simple data-attribute


Installation

Public

Install from npm

$ npm install @sumedia-sven/apex-animate

Local

If you want to develop your own npm package, you first have to test it locally. In this case our package is called @sumedia-sven/apex-animate

In our package dir, run:

$ npm link

This creates a symbolic link in the local folder of your node_modules. Just like when using $ npm -g

To use this package in another project we have to install it from the symbolic link.

$ npm link @sumedia-sven/apex-animate

This installs the package locally in another project with the right node_modules. When updating the package make sure to run $ npm link [package name] again in your project to update the package.

Usage

Import/require apex-animate in your file.

const apexAnimate = require('@sumedia-sven/apex-animate')
apexAnimate();

Use the data-attributes on HTML elements.

<!-- Fade in animation -->
<div data-apex-animate="fade-in"></div>

<!-- Parallax animation -->
<div data-apex-animate="parallax"></div>

<!-- Fade in to top with extra options -->
<div data-apex-animate="fade-to-top" data-apex-animate-duration="2" data-apex-animate-delay=".2"></div>

License

This project is available under the MIT license.

1.0.1

3 years ago

1.0.0

3 years ago