• Stars
    star
    177
  • Rank 215,985 (Top 5 %)
  • Language
    HTML
  • Created over 9 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Angular CSS3 animation directives (ngfx-bounce, ngfx-shake, ngfx-flip, ngfx-pulse and more ...) https://720kb.github.io/angular-fx

Angular Fx

Join the chat at https://gitter.im/720kb/angular-fx

Angular.js + animate.css

Conditional animations and effects for your elements: ngfx-shake, ngfx-pulse, ngfx-tada, and more ...

Just use them like you do for ng-if or ng-hide or ng-show.

It uses the awesome animate.css.

The Angular Fx is developed by 720kb.

Requirements

AngularJS v1.2+

animate.css

Browser support

Chrome Firefox IE Opera Safari
IE9 +

Load

To use the directive, include the Angular Fx javascript and css files in your web page and the animate.css file:

<!DOCTYPE HTML>
<html>
<head>
  <link href="bower_components/animate.css/animate.min.css" rel="stylesheet" type="text/css" />
  <!-- angular-fx.css goes after animate.css-->
  <link href="path/to/css/angular-fx.css" rel="stylesheet" type="text/css" />
</head>
<body ng-app="app">
  //.....
  <script src="path/to/js/angular-fx.js"></script>
</body>
</html>

Install

Bower

$ bower install angular-fx --save

then load the js files in your html

npm

$ npm install angular-fx --save

then load the js files in your html

Add module dependency

Add the 720kb.fx module dependency

angular.module('app', [
  '720kb.fx'
 ]);

Use them like you do for ng-if or ng-show or ng-hide

<a href="#" ngfx-pulse="3 > 2">Pulse</a>

Example

angular.module('app', [
  '720kb.fx'
 ])
 .controller('myCtrl',['$scope', '$timeout', function ($scope, $timeout) {
    $timeout(function () {

     $scope.x = 3;
    }, 2000);

    $timeout(function () {

     $scope.x = 1;
    }, 6000);
 }]);

Use them like you do for ng-if or ng-show or ng-hide

<div ng-controller="myCtrl">
<a href="#" ngfx-pulse="x > 2">Pulse</a>
<a href="#" ngfx-fade-out="{{myCondition}}">Fadeout</a>
</div>

live example

Complete list

you can refer to the animate.css animations list here

ngfx-flash

ngfx-pulse

ngfx-rubber-band

ngfx-shake

ngfx-swing

ngfx-tada

ngfx-wobble

ngfx-jello

ngfx-slide-in-up

ngfx-slide-in-left

ngfx-slide-in-right

ngfx-slide-in-down

ngfx-slide-out-up

ngfx-slide-out-left

ngfx-slide-out-right

ngfx-slide-out-down

ngfx-bounce-in

ngfx-bounce-in-down

ngfx-bounce-in-left

ngfx-bounce-in-right

ngfx-bounce-in-up

ngfx-bounce-out

ngfx-bounce-out-down

ngfx-bounce-out-left

ngfx-bounce-out-right

ngfx-bounce-out-up

ngfx-fade-in

ngfx-fade-in-down

ngfx-fade-in-down-big

ngfx-fade-in-left

ngfx-fade-in-left-big

ngfx-fade-in-right

ngfx-fade-in-right-big

ngfx-fade-in-up

ngfx-fade-in-up-big

ngfx-fade-out

ngfx-fade-out-down

ngfx-fade-out-down-big

ngfx-fade-out-left

ngfx-fade-out-left-big

ngfx-fade-out-right

ngfx-fade-out-right-big

ngfx-fade-out-up

ngfx-fade-out-up-big

ngfx-flip

ngfx-flip-in-x

ngfx-flip-in-y

ngfx-flip-out-x

ngfx-flip-out-y

ngfx-light-speed-in

ngfx-light-speed-out

ngfx-rotate-in

ngfx-rotate-in-up-left

ngfx-rotate-in-up-right

ngfx-rotate-in-down-left

ngfx-rotate-in-down-right

ngfx-rotate-out

ngfx-rotate-out-up-left

ngfx-rotate-out-up-right

ngfx-rotate-out-down-left

ngfx-rotate-out-down-right

ngfx-hinge

ngfx-roll-in

ngfx-roll-out

ngfx-zoom-in

ngfx-zoom-in-down

ngfx-zoom-in-left

ngfx-zoom-in-right

ngfx-zoom-in-up

ngfx-zoom-out

ngfx-zoom-out-down

ngfx-zoom-out-left

ngfx-zoom-out-right

ngfx-zoom-out-up

Options

Animation speed

To set a different animation speed use the ngfx-speed="medium | fast | slow" attribute (default value, if not specified, is medium):

<a href="#" ngfx-pulse="3 > 2" ngfx-speed="slow">Slow Pulse</a>
<a href="#" ngfx-pulse="3 > 2" ngfx-speed="medium">Medium Pulse</a>
<a href="#" ngfx-pulse="3 > 2" ngfx-speed="fast">Fast Pulse</a>

Element visibility

If you would your element to be shown or hidden by default, you can use the ngfx-default="hide | show" attribute:

<a href="#" ngfx-pulse="3 > 2" ngfx-default="show">Shown by default</a>
<a href="#" ngfx-pulse="3 > 2" ngfx-default="hide">Hidden by default</a>

Infinite animations

If you want an element to repeat the animation or the effect while your condition/expression is true (sometimes needed), just add the ngfx-infinite attribute to the element, or, if your browser doesn't support css attributes, use the .infinite class:

<a href="#" ngfx-pulse="3 > 2">Pulse one time</a>
<a href="#" ngfx-pulse="3 > 2" ngfx-infinite>Pulse continuously</a>
<a href="#" ngfx-pulse="3 > 2" class="infinite">Pulse continuously</a>

Contributing

We will be much grate if you help us making this project to grow up. Feel free to contribute by forking, opening issues, pull requests etc.

License

The MIT License (MIT)

Copyright (c) 2014 Filippo Oretti, Dario Andrei

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

ndm

💻 npm desktop manager https://720kb.github.io/ndm
JavaScript
2,068
star
2

radiobox.css

🔘 Tiny set of pure CSS animations for your radio inputs. https://720kb.github.io/radiobox.css/
CSS
698
star
3

angular-socialshare

Angular social share module, share urls and content on social networks such as facebook, google+, twitter, pinterest and more ... - http://720kb.github.io/angular-socialshare
HTML
509
star
4

checkbox.css

☑️ Tiny set of pure CSS animations for your checkbox input. https://720kb.github.io/checkbox.css/
JavaScript
477
star
5

angular-datepicker

Angularjs datepicker module, generate a datepicker on your input element - https://720kb.github.io/angular-datepicker
HTML
475
star
6

highlighter.js

Easily navigate the DOM and highlight the elements - http://720kb.github.io/highlighter.js/
HTML
382
star
7

angular-tooltips

Angularjs tooltips module, add tooltips to your elements - https://720kb.github.io/angular-tooltips
HTML
351
star
8

hubuntu-ui

Material Admin Dashboard Starter UI ( Ubuntu style ) - https://720kb.github.io/hubuntu-ui/
HTML
204
star
9

BitNFC

Bitcoin NFC Android Mobile Wallet - JS + Ionic + Cordova + Bitcore + Blockchain.info API + Cordova NFC plugin
CSS
99
star
10

butler

I/O customizable voice driven butler - http://720kb.github.io/butler/
JavaScript
87
star
11

yogurl

Serve files and code over HTTP in one command. The CLI for http://yogurl.io
JavaScript
45
star
12

checked.css

Tiny set of pure CSS animations that applies to checked elements. The power of checkbox.css + radiobox.css https://720kb.github.io/checked.css
CSS
38
star
13

nginx-docker-container

nginx docker container 🐳
Shell
25
star
14

TeachMusicRTC

Teach and Learn Music with WebRTC and pitch detection - TADHACK-mini London 2015, Google prize winner
HTML
23
star
15

node-amqp

Module for easy amqp comunication
JavaScript
22
star
16

csshelper

CSS helper, forget traditional css frameworks approach, every class is a task-like
CSS
16
star
17

angular-downloader

Angular Downloader is an angularjs directive that enables you to manage browser download - https://720kb.github.io/angular-downloader
JavaScript
16
star
18

angular-background

Angularjs dynamic background module, generate and change element background on the fly - http://720kb.github.io/angular-background
JavaScript
16
star
19

comunicator

A simple full duplex api. At the moment the transport is backed by websockets.
JavaScript
11
star
20

oauthd-docker-container

Docker oAuthd Container 🐳
Shell
10
star
21

signaler

JavaScript
5
star
22

website

Official website http://720kb.net
HTML
4
star
23

limitd-docker-container

Shell
1
star
24

self-signed-certs

JavaScript
1
star
25

dat

Old cassettes never die
Shell
1
star
26

hapi-limitd

an auth0/limitd plugin for hapi
JavaScript
1
star
27

biwi

#@#$#RWEFOAOJFAMD Wifi access metered, pay via btc micro transactions
JavaScript
1
star
28

720kb.github.io

720kb github page
CSS
1
star