Git Product home page Git Product logo

webicon's Introduction

Icon library

Insert the icons in 30 seconds using the new Icon Sets technology.

Installing webicon

You can install this package locally either with npm, bower, or jspm.

npm

npm install webicon

Now you can use require('webicon/angular-webicon') or require('webicon/jquery-webicon') when installing with npm or jsmp and using Browserify or Webpack.

bower

# To get the latest stable version, use bower from the command line.
bower install webicon

# To get the most recent, last committed-to-master version use:
bower install webicon#master 

# To save the bower settings for future use:
bower install webicon --save

# Later, you can use easily update with:
bower update

Please note that webicon requires AngularJS 1.1.x or higher for use as Angular module. Please note that webicon requires jQuery 1.8.x or higher for use as jQuery plugin.

Using the webicon library

Simply include the scripts and stylesheet in your main HTML file in the order shown in the example below. Note that npm will install the files under /node_modules/webicon/ and bower will install them under /bower_components/webicon/.

Simple demo for AngularJS version

<body ng-app="app">
  <webicon icon="material-icons:3d-rotation" alt=""></webicon>
  <webicon icon="font-awesome:home" alt="home"></webicon>
  <webicon icon="fci:checkmark"></webicon>
  <webicon icon="clock"></webicon>
  <webicon icon="//cdn.rawgit.com/icons8/flat-color-icons/v1.0.2/svg/search.svg"></webicon>
  <webicon icon="calendar"></webicon>  

  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.1.5/angular.js"></script>
  <script type="text/javascript" src="/bower_components/webicon/angular-webicon.js"></script>

  <script>
    angular
      .module('app', ['webicon'])
      .config(function($webiconProvider) {
        $webiconProvider
          .svgSet('flat-color-icons', '//cdn.rawgit.com/icons8/flat-color-icons/v1.0.2/icon-set/icons.svg')
          .alias('flat-color-icons', 'fci')
          .icon('clock', '//cdn.rawgit.com/icons8/flat-color-icons/v1.0.2/svg/clock.svg')
      });
  </script>
</body>

Simple demo for jQuery version

<body>
  <div data-webicon="material-icons:3d-rotation" data-alt=""></div>
  <div data-webicon="font-awesome:home" data-alt="home"></div>
  <div data-webicon="fci:checkmark"></div>
  <div data-webicon="clock"></div>
  <div data-webicon="//cdn.rawgit.com/icons8/flat-color-icons/v1.0.2/svg/search.svg"></div>
  <div data-webicon="calendar"></div>  

  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.js"></script>
  <script type="text/javascript" src="/bower_components/webicon/jquery-webicon.js"></script>

  <script>
    $(function() {
      $(document).webicons({
        svgSet: {
          "flat-color-icons": '//cdn.rawgit.com/icons8/flat-color-icons/v1.0.2/icon-set/icons.svg'
        },
        alias: {
          fci: 'flat-color-icons'
        },
        icon: {
          clock: '//cdn.rawgit.com/icons8/flat-color-icons/v1.0.2/svg/clock.svg'
        }
      });
    });
  </script>
</body>

More demo here

Features

  • Available all Icons8 open source icons via our api as default source.
  • The icons are stored on our CDN server (which is free forever).
  • You insert the icons right into your code.

webicon's People

Contributors

betula avatar konstantinvlasov avatar icons8-team avatar

Watchers

 avatar James Cloos 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.