Free ‘plug and play’ set of SVG icons designed specifically for web projects. Available as a Ruby gem, a Node.js package and Grunt/Gulp plugins. Just use icon names with your templates and styles — and all the rest will be done automagically.
Made by Alexander Madyankin and Roman Shamin.
Usage
Supported browsers
We support IE 9+, Firefox, Chrome, Safari (desktop and mobile), Opera, Android 4+. http://caniuse.com/#search=inline svg
Grunt
Use the Grunt plugin.
Gulp
Use the Gulp plugin.
CDN
Just include the assets into your page from CDN:
And use the icons like this:
Rails
Add the 'evil_icons'
gem to your Gemfile:
Add the Evil Icons require to your application.css
:
/* *= require evil-icons */
Next, you have to render the evil-icons sprite in your template (or, in your layout):
Finally, you can render the icon using the evil_icon
helper.
Here are some examples:
Sinatra
Add the 'evil_icons'
gem to your Gemfile:
And require it:
require 'evil_icons'
Add the helpers to your application:
helpers EvilIcons::Helpers
Next, you have to render the evil-icons sprite in your template (or, in your layout):
Finally, you can render the icon using the evil_icon
helper.
Here are some examples:
In order to use the stylesheets, you have to add Sprockets to your application.
Add sinatra-asset-pipeline
to your Gemfile:
And register it:
register Sinatra::AssetPipeline
Finally, add the Evil Icons require to your application.css
:
/* *= require evil-icons */
Also, you can take a look at example app by @aderyabin.
Middleman
Add the 'evil_icons'
gem to your Gemfile:
Add the Evil Icons require to your main css file eg. `source/stylesheets/styles.css``:
/* *= require evil-icons */
Add following to your config.rb
to register Evil Icons helpers:
helpers EvilIcons::Helpers after_configuration do sprockets.append_path(EvilIcons.assets_dir)end
Next, you have to render evil-icons sprite in your layout similar to the Rails usage:
And finally evil_icon
helper renders icons just like with the Rails:
npm
Add the 'evil-icons'
package to your project:
npm install evil-icons
Add the Evil Icons styles to your pages:
Require evil-icons
in your JavaScript code:
var icons =
Finally, you can render the icons in your page using helpers. Here are some examples:
/* A string with SVG sprite */iconssprite; /* Icons rendering */icons;icons;icons;
React
Use the React component.
Styling
Every icon has the .icon
class and its modifier including the icon name. For example, the Facebook icon has the .icon--ei-sc-facebook
modifier.
Also, an icon may have a size modifier. But we do recommend to change the size using helper's size
parameter instead. Evil Icons have some predefined sizes: s
(25x25, default), m
(50×50), l
(100×100), xl
(150×150) and xxl
(200×200). You may want to add more sizes, we recommend keeping the sizes multiple to 25.
icons
Also, you may want to add a custom class for an icon.
You can do this using the class
parameter:
icons
An icon's color can be changed in CSS:
Roadmap
- Custom icons
- More styles