Coder Social home page Coder Social logo

abhiprojectz / motionia Goto Github PK

View Code? Open in Web Editor NEW
324.0 6.0 10.0 7.28 MB

The Ultimate & smart JS animation library! Simple fast , flexible & easy to integrate.

License: GNU General Public License v3.0

Batchfile 0.39% Python 99.61%
animation generator tool python solana trading-bot usdc

motionia's Introduction

Alt Text

The Ultimate & smart JS animation library!
GitHub stars GitHub license


Simple fast , flexible & easy to integrate. No need to write page long CSS Keyframes that consumes a lot of time and no need to waste a lot on their customizations.

Introduction

Motionia.js is a advanced JS library built with the aim of simplicity and customisablilty.

Rich Api for all your animation needs in pure javascript , forget traditional method of writing page long css keyframes to animate elements, use the new way the motionia way!

head towards the Docs: https://motionia.netlify.app for more details.

No need of using any kind of Scroll library, motionia is independent => No dependencies.

The library is built with best code practices resulting in slow load , loads in 1.3 seconds only!

Alright, so explain me in 30 secs what it is actually?

Wanna save time? then just animate elements by adding data attributes.

Alt Text

<div data-motionia='fadeIn'> hi!, i am a fading in text! :)
 </div>

With a tons of customizations to elements such as delay , duration , repeat , easing , direction etc parameters.

all by using data attributes to html parametric elements itself.

Need to animate elements using js for some reasons? then just use like:

var myAnim = new motionia() 
// initialize motionia.js

myAnim.mo({
targets: '#div',
anim: 'rollLeft'
duration: '5s'
})
// targets can be any html parametric element and 
// then customize according to your needs!
// using simple JSON like structure.

Where to get?

Alt Text

Motionia on github

Experiment with it here

Alt Text

Documentation

Docs: https://motionia.netlify.app

Go through the docs to get to know everything about the library.

Examples

Visit my codepen for motionia.js examples and demos and to grasp easily what motionia can actually do.

Alt Text

Installations

Just add a script path of motionia via JSDELIVR into the head of your project

<script src="https://cdn.jsdelivr.net/gh/abhiprojectz/motionia@latest/dist/motionia.js" defer></script>

Usage

We have a svg with id as mysvg now we wanna animate it such that animations triggers when it appears in viewport.

Alt Text

add a rolling effect from left rollleft

Alt Text

Set a delay of 5s

This is just a small example.

The animation will be triggered as soon as the element appers inside the viewport.

Note: if you want to trigger element using js then refer the section below.

<div data-mationia='rollLeft' data-delay='5s'> rolling from
 left </div>

The supported animation property is a shorthand property which can be accessed for:

  • Animation-name
  • Animation-duration
  • Animation-timing-function
  • Animation-delay
  • Animation-iteration-count
  • Animation-direction
  • Animation-fill-mode
  • Animation-play-state

Refer documentations for more details.

Sliding a element right by 200px

No keyframes straight forward text parameters.

use anim name slide as data-motionia='slide' then specify amount that is data-right='200px' & over!

<div data-motionia='slide' data-right='200px'>i slide by 200px right</div>

Alt Text

Using js syntax for advanced usage.

You can also trigger animation inside a function like onclick , ontouch etc or maybe as a result of a function.

Pre-built anims , which uses simple syntax makes it easy to decorate our project easily & without any dependencies.

First of all initialize motionia.jsa

var myAnim = new motionia() 
// initialize motionia.js

Now you can create a object and pass parameters in it to customize the anim.

use .mo method to pass parameters

myAnim.mo({
targets: '#div',
anim: 'rollLeft'
duration: '5s'
})

You can also overrides targets on every object no need to initialize motionia more than once.

Alt Text

Ideas

Many other animation library doesn't provide us built animations but motionia.js do.

Trigger it when elements visible in viewport or trigger on a click using easy JS setup.

The .mo({}) method quite works as a timeline feature.

So, keep going animating by a line.

For brief explanation refer docs.

Alt Text

Documentation

grab the docs here: docs of motionia

BONUS!

Now comes the MAIN part!

The best thing of motionia.js is mixing up of anims.

So , it totally depends on your creativity of how you mix the animations.

To rotate & then make a element bigger in size use:

data-motionia='rotateScaleIn' we just mixed the animations name.

Alt Text

Features at a glance

  • 30+ base animations.
  • Animation property customizations.
  • Easy Scroll builtin animation triggering.
  • Mixing Of animations increases the no. of built-in animations thus, makes it lightweight.
  • JSON structure customization.
  • NO dependencies
  • Tested on all major browsers.

Alt Text

Contribute

Docs: https://motionia.netlify.app

This is very important do fork it right now and come up with your ideas!

Stargazers repo roster for @abhiprojectz/motionia

Forkers repo roster for @abhiprojectz/motionia

Alt Text

motionia's People

Contributors

abhiprojectz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.