GithubHelp home page GithubHelp logo

yashwanthbyalla / yb-seal-demo Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 36 KB

This is demo for the npm package named yb-seal. SEAL - This is a light weight Scroll Effect Animation Library.

License: MIT License

HTML 87.00% CSS 13.00%

yb-seal-demo's Introduction

yb-seal-demo

SEAL - Scroll Effect Animation Library

This is a light weight Scroll Effect Animation Library.

Lightweight, performance focused (2.3 kb) scroll effect animation library, written in Typescript and compiled to JavaScript. No dependencies!

Seal (Scroll Effect Animation Library) was created to provide a lightweight solution for animating elements upon scroll. It's based on DOM objects which gives amazing performance in terms of checking the element's presence in the viewport.

๐Ÿš€ Demo

๐Ÿš€ npm library

Table of Contents

Install

# Usage with NPM
$ npm install yb-seal

Load it with your favorite module loader or use as a global variable

// ES6 modules
import seal from 'yb-seal';

or
// CommonJS modules
var seal = require('yb-seal');

or
//simply add below line in angular.json file under scripts array:

"node_modules/yb-seal/src/index.js"

And remember to add styles

@import '~yb-seal/src/yb-seal.css';

or

// add below line in angular.json file under styles array:
"node_modules/yb-seal/src/yb-seal.css"

Usage

In HTML, add a yb-seal class to make sure it tracks the respective element and behave accordingly with the scroll. Along with this add the animation name as value, for example:

<div class="yb-seal yb-seal-slide-right"></div>

It will look for all classes with a yb-seal class and launch it's respective animation based on viewport scroll.

Animations

In seal you can easily change animation's classes, by adding a proper yb-seal classes:

  • yb-seal-duration - changes duration of the animation (enter value in seconds)

For example:

<div
    class="yb-seal yb-seal-slide-right" yb-seal-duration="2"
></div>

The library supports several animations:

  • yb-seal-slide-up
  • yb-seal-slide-down
  • yb-seal-slide-right
  • yb-seal-slide-left
  • yb-seal-zoom-in
  • yb-seal-zoom-out
  • yb-seal-flip-left
  • yb-seal-flip-right
  • yb-seal-flip-up
  • yb-seal-flip-down

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.