universal-frontend

0.1.5 • Public • Published

universal-frontend

Universal-Frontend is my personal JavaScript library created to enhance my web development experience and streamline project work. It includes functions I frequently use when crafting web application interfaces, such as animations, class management, event handling, and more.

installation

npm i universal-frontend

Includes

  1. universalObserver - Object containing a set of classes to observe; Classes: scrollViewElementAnimation, ScrollViewAddClass
  2. In developing: universalClick,universaDoubleClick,universalMouseMove,universalScroll,universalResize,universalForm etc.

Usage example

import universal from "universal-frontend";

const animation = new universal.universalObserver.scrollViewElementAnimation();
animation.bottomAnimation();
<div class="slide-from-bottom">Example</div>

Object: universal.universalObserver.scrollViewElementAnimation

List of methods:

  • slideFromBottom()
  • slideFromTop()
  • slideFromRight()
  • slideFromLeft()
  • opacityAnimate()

Accepts optional options:

  • targetElement
  • animationShift
  • opacity
  • viewElement
  • timeAnimate
  • track
  • warn

Default classes:

  • .slide-from-top
  • .slide-from-bottom
  • .slide-from-left
  • .slide-from-right
  • .opacity

Object: universal.universalObserver.scrollViewAddClass

List of methods:

  • addClass()

Accepts optional options:

  • targetElement
  • activeClass
  • viewElement
  • timeAnimate
  • track
  • warn

Default classes:

  • .scroll-add
  • .active

Readme

Keywords

Package Sidebar

Install

npm i universal-frontend

Weekly Downloads

2

Version

0.1.5

License

MIT

Unpacked Size

24.9 kB

Total Files

6

Last publish

Collaborators

  • dmitry_volkov