iconate

Transform your icons with trendy animations.

Github星跟踪图

iconate.js

A call to transform your existing icons in a cool trendy way

iconate.js is a tiny performant library for cross-browser icon transformation animations in your projects.

Demo

Installation

  • NPM: npm install iconate
  • Bower: bower install iconate
  • Download zip.

Note: iconate.js also supports AMD and commonJS module pattern.

Basic Usage

  1. Include the Stylesheet and Javascript files in your html.

    <link rel="stylesheet" href="iconate.min.css">
    <script type="text/javascript" src="iconate.min.js">
    
  2. Create icon element.

    <i id="icon" class="fa fa-bars fa-lg"></i>
    
  3. Animate icon from fa-bar to fa-arrow-right with rubberBand animation.

    var iconElement = document.getElementById('icon');
    var options = {
        from: 'fa-bars',
        to: 'fa-arrow-right',
        animation: 'rubberBand'
    };
    
    iconate(iconElement, options);
    
  4. Following AnimationTypes can be used in iconate call.

    • rollOutRight
    • rollOutLeft
    • rubberBand
    • zoomOut
    • zoomIn
    • fadeOut
    • fadeOutRight
    • fadeOutLeft
    • fadeOutTop
    • fadeOutBottom
    • horizontalFlip
    • verticalFlip
    • bounceOutBottom
    • bounceOutTop
    • bounceOutLeft
    • bounceOutRight
    • rotateClockwise
    • rotateAntiClockwise
    • tada

Public API

iconate(element, [, options] [, callback] )

Animate an icon element.

  • element - Icon Element to perform operations on.
  • options - Object containing options to control the animation.
    • from - Current icon class name (ex. 'fa-bars' in case of font-awesome)
    • to - Final icon class name (ex. 'fa-arrow-right')
    • animation - You can choose any animation from above listed animation types. (ex. 'fadeOutRight')(default: 'zoomOut')
  • callback - Optional callback to execute after animation completes.

Browser Support

Chrome, Firefox, IE, Opera, Safari, ---, ---, ---, ---, ---, 4+ ✔, 16+ ✔, 10+ ✔, 15+ ✔, 6+ ✔, License

Copyright (c) 2015 Jignesh Kakadiya, http://bitshadow.github.io
Licensed under the MIT license.

主要指标

概览
名称与所有者AlexanderPoellmann/PaymentFont
主编程语言CSS
编程语言JavaScript (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2014-09-21 22:41:24
推送于2017-12-21 11:26:03
最后一次提交2017-12-21 12:26:02
发布数10
最新版本名称1.2.5 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数1.6k
关注者数33
派生数126
提交数79
已启用问题?
问题数167
打开的问题数100
拉请求数4
打开的拉请求数0
关闭的拉请求数4
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?