universal-frontend
v0.1.5
Published
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
Downloads
4
Readme
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
- universalObserver - Object containing a set of classes to observe; Classes: scrollViewElementAnimation, ScrollViewAddClass
- 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