All Projects → webkul → Micron

webkul / Micron

Licence: mit
a [μ] microInteraction library built with CSS Animations and controlled by JavaScript Power

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to Micron

web-animation-club
CSS controlled animations with transitionEnd, onTransitionEnd, animationend, onAnimationEnd events and frame throwing. Tiny javascript library with cross-browser methods to handle css animation/transition callbacks and event loop frame throwing. 📚🖥️📱
Stars: ✭ 52 (-97.69%)
Mutual labels:  css3, css-animations, javascript-library
learn-css-animation
Learn CSS animation with fun. It is simple, easy to use, and fun to learn.
Stars: ✭ 54 (-97.6%)
Mutual labels:  css3, css-animations
aioneframework
Aione Framework: All-in-one lightweight mobile first front-end framework to design websites, web applications, mobile applications, progressive web applications having large number of examples, documentation, tutorials, community support, components.
Stars: ✭ 13 (-99.42%)
Mutual labels:  css-animations, javascript-library
Josh.js
A JavaScript library to animate content on page scroll.
Stars: ✭ 345 (-84.68%)
Mutual labels:  javascript-library, css-animations
animusjs
🎆 AnimusJS is the solution for combine JS and CSS animations.
Stars: ✭ 42 (-98.13%)
Mutual labels:  css-animations, javascript-library
MERN-BUS-APP
This is a MFRP (My first Real Project) assigned to me during my internship at Cognizant. Made with MERN Stack technology.
Stars: ✭ 92 (-95.91%)
Mutual labels:  css3, css-animations
You Need To Know Css
💄CSS tricks for web developers~
Stars: ✭ 3,777 (+67.72%)
Mutual labels:  css3, css-animations
css-art-gallery
A collection of CSS Arts.
Stars: ✭ 127 (-94.36%)
Mutual labels:  css3, css-modules
Agilejs
AgileJS - The Css3 Creation Engine 🍖🌭🍔
Stars: ✭ 489 (-78.29%)
Mutual labels:  css3, css-animations
Jde
Linux desktop environment built with HTML5, CSS, JavaScript and Python.
Stars: ✭ 591 (-73.76%)
Mutual labels:  javascript-library, css3
Morphist
A simple, high-performance and cross-browser jQuery slider / slideshow / carousel plugin for child objects powered by Animate.css.
Stars: ✭ 60 (-97.34%)
Mutual labels:  css3, css-animations
Landing-Page-Animation
Landing page animation made using CSS
Stars: ✭ 45 (-98%)
Mutual labels:  css3, css-animations
hexa
Awesome Css Animation. The documentation =>
Stars: ✭ 32 (-98.58%)
Mutual labels:  css3, css-animations
aprendendo-css
Vários desenhos feitos com CSS e SCSS (e as vezes um pouco de JavaScript)
Stars: ✭ 56 (-97.51%)
Mutual labels:  css3, css-animations
Nodeppt
This is probably the best web presentation tool so far!
Stars: ✭ 9,589 (+325.8%)
Mutual labels:  javascript-library, css3
css-collection
🧙‍♂️ CSS芸人への道(CSSでつくったもの集)| I want to be CSS Magician
Stars: ✭ 82 (-96.36%)
Mutual labels:  css3, css-animations
DevHelpBox
we are creating this community so that other developers can get benefits of it.
Stars: ✭ 35 (-98.45%)
Mutual labels:  css3, javascript-library
CSS-Collection
A wide variety of animations done using only CSS
Stars: ✭ 44 (-98.05%)
Mutual labels:  css3, css-animations
Morphext
A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.
Stars: ✭ 384 (-82.95%)
Mutual labels:  css3, css-animations
Pure Css3 Animated Border
Pure CSS3 animated border for all html element.
Stars: ✭ 63 (-97.2%)
Mutual labels:  css3, css-animations

Micron.JS

Check Interactive Doc on Website.


Introduction

Micron.JS is a micro interaction library which can be used to add Interactions to different DOM Elements. Micron.JS animates an element using CSS power and the interactive behaviours are controlled by JavaScript.

Micron.JS is easy to adapt and can bring interactions to life using html5 data attributes or a chain of JavaScript methods.

Getting Started

To get started with Micron.JS, you need to include both micron.min.css * (which have all ready to use interaction animations) and micron.min.js If you don't need all the available interactions, you can simply include the respective *.min.css file only.

Installation

Compiled CSS and JavaScript minified files can be directly linked from UNPKG CDN or Micron.JS can be included within your workflow using your favorite package managers as well.

Link from UNPKG CDN

Include both the Micron CSS and JavaScript files in the header section of your document.

<link href="https://unpkg.com/[email protected]/dist/css/micron.min.css" type="text/css" rel="stylesheet">
<script src="https://unpkg.com/[email protected]/dist/script/micron.min.js" type="text/javascript"></script>

Package Managers

You can use either npm or bower to get the Micron.JS package.

Copy and Paste the command below in your terminal to get package with npm -

npm install webkul-micron

Load the package with the code below:

const micron = require('webkul-micron');

Copy and Paste the command below in your terminal to get package with bower -

bower install webkul-micron

Usage

Micron JS is very easy and quick to use.

Adding an Interaction

Add the data-micron="interaction" attribute to the respective element and Voila! you are already there.

Example Code

<a href="#!" class="button" data-micron="bounce">Label</a>

Controlling Duration

Micron Interactions defaults to ".45" seconds. Add the data-micron-duration="number" attribute to control the duration of the defined interaction.

Example Code

<a href="#!" class="button" data-micron="bounce" data-micron-duration=".95">Label</a>

Controlling Timing or Ease

Micron Interactions defaults to "ease-in-out". Add the data-micron-timing="@type" attribute to control the easing of the defined interaction.

For now, @type only supports the easings mentioned below-

linear

ease-in

ease-out

ease-in-out

Example Code

<a href="#!" class="button" data-micron="bounce" data-micron-timing="ease-in">Label</a>

Bind Interaction

Add data-micron-bind="true" & data-micron-id="name" to the defined triggering element, and interaction will be applied to the element which reference to the defined id attribute.

Example Code

<a href="#!" class="button" data-micron="bounce" data-micron-bind="true" data-micron-id="me">Label</a>
<a href="#!" class="button" id="me">Binded</a>

Access inside JavaScript

Call micron chained methods to apply interactions to any DOM Element, right in your custom block of JavaScript Code.

micron.getEle("").interaction("").duration("").timing("");

Pass an argument with selector name which can either be id or a class to getEle() method.

Pass an argument with interaction name to interaction() method.

Pass an argument which is a number to duration() method.

Pass an argument with type of ease to timing() method.

Example Code

function myFunc(){
    micron.getEle("#me").interaction("bounce").duration(".45").timing("ease-out");
 }

//Call Interaction
myFunc();

Interactions

Currently, Micron.JS supports the interactions mentioned below, head back to the homepage to see all interactions in the real action.

data-micron="shake"

data-micron="fade"

data-micron="jelly"

data-micron="bounce"

data-micron="tada"

data-micron="groove"

data-micron="swing"

data-micron="squeeze"

data-micron="flicker"

data-micron="jerk"

data-micron="blink"

data-micron="pop"

Customization

You can even add your very own css interaction to Micron.JS.

First include the code mentioned below in your css file.

.mjs-linear{animation-timing-function:cubic-bezier(0,0,1,1)}.mjs-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.mjs-ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.mjs-ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}

Create a class with .mjs- prefix. Call the keyframe css animation inside it. Use the interaction with your class name without .mjs- prefix.

Example Code

 /*Define a Class*/
 .mjs-custom{
    animation: custom-action;
 }

 @keyframes custom-action{
    from { . . . }
    to { . . . }
 }

Now use interaction with data-micron="custom"

Credits

© Copyright 2018 Webkul Software, All rights reserved.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].