evil-icons
Simple and clean SVG icon pack with the code to support Rails, Sprockets, Node.js, Gulp, Grunt and CDN
Top Related Projects
The iconic SVG, font, and CSS toolkit
Simply beautiful open-source icons
Premium hand-crafted icons built by Ionic, for Ionic apps and web apps everywhere 🌎
A scalable set of icons handcrafted with <3 by GitHub
Material Design icons by Google (Material Symbols)
✒7000+ Material Design Icons from the Community
Quick Overview
Evil Icons is a simple and clean SVG icon pack with the code to support them. It includes a set of SVG icons, spritesheet, and styles for popular CSS frameworks like Bootstrap, Foundation, and SASS. The project aims to provide an easy-to-use icon solution for web developers and designers.
Pros
- Large collection of high-quality, customizable SVG icons
- Easy integration with popular CSS frameworks and build tools
- Lightweight and optimized for performance
- Supports both icon fonts and SVG sprites
Cons
- Limited icon customization options compared to some other icon libraries
- Not as frequently updated as some more popular icon sets
- May require additional setup for some frameworks or build systems
- Documentation could be more comprehensive for advanced usage
Code Examples
- Basic usage in HTML:
<div data-icon="ei-archive"></div>
<div data-icon="ei-chart" data-size="s"></div>
<div data-icon="ei-check" data-size="m"></div>
<div data-icon="ei-spinner" data-size="l"></div>
- Using Evil Icons with Ruby on Rails:
# In your Gemfile
gem 'evil_icons'
# In your application.rb
require 'evil_icons'
# In your layout file
<%= evil_icons_sprite %>
- Using Evil Icons with Node.js:
const evilIcons = require('evil-icons')
// Generate sprite
const sprite = evilIcons.sprite
// Render icon in HTML
const icon = evilIcons.icon('ei-search', {size: 'm'})
Getting Started
To use Evil Icons in your project, follow these steps:
-
Install Evil Icons:
npm install evil-icons
-
Include the Evil Icons styles in your HTML:
<link rel="stylesheet" href="path/to/evil-icons.css">
-
Add the Evil Icons sprite to your HTML:
<div id="evil-icons-sprite" style="display: none;"> <!-- Sprite content will be injected here --> </div>
-
Use Evil Icons in your HTML:
<div data-icon="ei-search"></div> <div data-icon="ei-arrow-right" data-size="s"></div>
-
Initialize Evil Icons in your JavaScript:
import 'evil-icons'
That's it! You can now use Evil Icons in your project.
Competitor Comparisons
The iconic SVG, font, and CSS toolkit
Pros of Font-Awesome
- Extensive icon library with over 7,000 icons
- Regular updates and additions to the icon set
- Strong community support and widespread adoption
Cons of Font-Awesome
- Larger file size due to the extensive icon set
- More complex implementation, especially for advanced features
- Potential performance impact when loading many icons
Code Comparison
Evil Icons:
<svg class="icon icon--ei-chart">
<use xlink:href="#ei-chart-icon"></use>
</svg>
Font-Awesome:
<i class="fas fa-chart-bar"></i>
Key Differences
- Evil Icons focuses on a smaller, curated set of icons, while Font-Awesome offers a vast library
- Evil Icons uses SVG sprites, which can be more performant for smaller icon sets
- Font-Awesome provides more styling options and variations out of the box
- Evil Icons has a simpler implementation, ideal for projects with minimal icon needs
- Font-Awesome offers both free and paid versions with additional features
Use Cases
- Choose Evil Icons for projects requiring a lightweight, simple icon solution
- Opt for Font-Awesome when a wide variety of icons and styles are needed
- Consider Evil Icons for performance-critical applications with few icon requirements
- Use Font-Awesome for projects that may need frequent icon additions or updates
Simply beautiful open-source icons
Pros of Feather
- Larger icon set with over 280 icons compared to Evil Icons' 70+
- More active development and frequent updates
- Supports multiple formats including SVG, React components, and icon fonts
Cons of Feather
- Slightly larger file size due to the extensive icon set
- Less opinionated design style, which may require more customization
Code Comparison
Evil Icons (Ruby):
require 'evil_icons'
EvilIcons.sprite_file
# => "/path/to/sprite.svg"
Feather (JavaScript):
import { icons } from 'feather-icons'
const svgString = icons.activity.toSvg()
// Returns SVG string for the 'activity' icon
Both libraries offer easy integration, but Feather provides more flexibility in terms of usage and customization options. Evil Icons has a simpler API, which may be preferable for smaller projects or those with specific design requirements. Feather's larger icon set and multiple format support make it more versatile for diverse project needs, while Evil Icons' focused collection and opinionated design may be advantageous for quick implementation with a consistent look.
Premium hand-crafted icons built by Ionic, for Ionic apps and web apps everywhere 🌎
Pros of Ionicons
- Larger icon set with over 1,200 icons compared to Evil Icons' 70+
- Supports multiple file formats (SVG, WebFont, PNG, and JS)
- Offers both Material Design and iOS-style icons
Cons of Ionicons
- Larger file size due to the extensive icon set
- May require more setup and configuration for certain frameworks
Code Comparison
Evil Icons usage:
<div data-icon="ei-archive"></div>
Ionicons usage:
<ion-icon name="archive"></ion-icon>
Summary
Ionicons offers a more comprehensive icon set with greater versatility in terms of file formats and design styles. It's particularly well-suited for projects using Ionic Framework or those requiring a wide variety of icons. However, this comes at the cost of a larger file size and potentially more complex setup.
Evil Icons, while offering fewer icons, provides a simpler, more lightweight solution that may be preferable for smaller projects or those with specific design needs. Its implementation is straightforward and requires minimal setup.
Both libraries offer easy-to-use HTML implementations, with Ionicons using a custom element and Evil Icons using a data attribute. The choice between the two largely depends on the project's scope, design requirements, and performance considerations.
A scalable set of icons handcrafted with <3 by GitHub
Pros of Octicons
- Larger icon set with over 200 icons, providing more variety
- Officially maintained by GitHub, ensuring consistency with their design system
- Supports multiple file formats (SVG, PNG, WebFont)
Cons of Octicons
- Heavier file size due to the larger icon set
- More complex implementation, especially for custom builds
- Primarily designed for GitHub's ecosystem, which may limit versatility in other contexts
Code Comparison
Evil Icons usage:
<%= evil_icon 'ei-archive' %>
<%= evil_icon 'ei-chart', size: :m %>
<%= evil_icon 'ei-check', size: :l, class: "custom-class" %>
Octicons usage:
<%= octicon "mark-github" %>
<%= octicon "mark-github", height: 32 %>
<%= octicon "mark-github", height: 32, class: "custom-class" %>
Both libraries offer simple HTML helpers for icon insertion, with Evil Icons using a prefix and Octicons using descriptive names. Octicons allows for more granular size control through height specification, while Evil Icons uses predefined size categories.
Material Design icons by Google (Material Symbols)
Pros of Material Design Icons
- Extensive collection with over 1,000 icons in various styles and themes
- Regular updates and additions to the icon set
- Comprehensive documentation and guidelines for usage
Cons of Material Design Icons
- Larger file size due to the extensive collection
- May require more effort to customize or modify icons
- Potential for inconsistency when mixing different icon styles
Code Comparison
Material Design Icons:
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons">favorite</i>
Evil Icons:
<svg class="icon icon--ei-heart">
<use xlink:href="#ei-heart-icon"></use>
</svg>
Summary
Material Design Icons offers a vast collection of icons with regular updates and comprehensive documentation. However, it may have a larger file size and require more effort to customize. Evil Icons provides a smaller, more focused set of icons with easier customization options but may lack the extensive variety found in Material Design Icons. The choice between the two depends on project requirements, desired flexibility, and performance considerations.
✒7000+ Material Design Icons from the Community
Pros of MaterialDesign
- Larger icon set with over 7,000 icons, offering more variety
- Supports multiple file formats (SVG, PNG, XAML)
- Regular updates and community contributions
Cons of MaterialDesign
- Larger file size due to extensive icon collection
- May require more time to find specific icons
- Steeper learning curve for implementation
Code Comparison
MaterialDesign (JavaScript):
import { mdiAccount } from '@mdi/js';
import Icon from '@mdi/react';
<Icon path={mdiAccount}
size={1}
color="red"
/>
Evil Icons (HTML):
<div data-icon="ei-user" data-size="s"></div>
Summary
MaterialDesign offers a vast collection of icons with multiple format support, making it suitable for larger projects with diverse icon needs. Evil Icons, while having a smaller set, provides a simpler implementation and faster load times due to its focused collection. The choice between the two depends on project requirements, with MaterialDesign excelling in variety and Evil Icons in simplicity and performance.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Free âplug and playâ set of SVG icons designed specifically for web projects. Available as a Ruby gem, a Node.js package and
/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%20svg
Grunt
Use the Grunt plugin
Gulp
Use the Gulp plugin
CDN
Just include the assets into your page from CDN:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/evil-icons@1.9.0/assets/evil-icons.min.css">
<script src="https://cdn.jsdelivr.net/npm/evil-icons@1.9.0/assets/evil-icons.min.js"></script>
And use the icons like this:
<div data-icon="ei-archive"></div>
<div data-icon="ei-chart" data-size="s"></div>
<div data-icon="ei-check" data-size="m"></div>
<div data-icon="ei-spinner" data-size="m"></div>
<div data-icon="ei-cart" data-size="l" class="foo"></div>
Rails
Add the 'evil_icons'
gem to your Gemfile:
gem 'evil_icons'
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):
<%= evil_icons_sprite %>
Finally, you can render the icon using the evil_icon
helper.
Here are some examples:
<%= evil_icon 'ei-search' %>
<%= evil_icon 'ei-arrow-right', size: :m %>
<%= evil_icon 'ei-envelope', size: :l, class: "custom-class" %>
Sinatra
Add the 'evil_icons'
gem to your Gemfile:
gem 'evil_icons'
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):
<%= evil_icons_sprite %>
Finally, you can render the icon using the evil_icon
helper.
Here are some examples:
<%= evil_icon 'ei-search' %>
<%= evil_icon 'ei-arrow-right', size: :m %>
<%= evil_icon 'ei-envelope', size: :l, class: "custom-class" %>
In order to use the stylesheets, you have to add Sprockets to your application.
Add sinatra-asset-pipeline
to your Gemfile:
gem 'sinatra-asset-pipeline'
And register it:
require 'sinatra/asset_pipeline'
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:
gem 'evil_icons'
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:
require 'evil_icons'
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:
<%= evil_icons_sprite %>
And finally evil_icon
helper renders icons just like with the Rails:
<%= evil_icon 'ei-search' %>
<%= evil_icon 'ei-arrow-right', size: :m %>
<%= evil_icon 'ei-envelope', size: :l, class: "custom-class" %>
npm
Add the 'evil-icons'
package to your project:
npm install evil-icons
Add the Evil Icons styles to your pages:
<link rel="stylesheet" type="text/css" href="./node_modules/evil-icons/assets/evil-icons.css">
Require evil-icons
in your JavaScript code:
var icons = require("evil-icons")
Finally, you can render the icons in your page using helpers. Here are some examples:
/* A string with SVG sprite */
icons.sprite;
/* Icons rendering */
icons.icon("ei-search");
icons.icon("ei-arrow-right", {size: "m"});
icons.icon("ei-envelope", {size: "l", class: "custom-class"});
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.icon("ei-arrow-right", {size: "m"})
Also, you may want to add a custom class for an icon.
You can do this using the class
parameter:
icons.icon("ei-envelope", {class: "custom-class"})
An icon's color can be changed in CSS:
.icon {
fill: green;
}
.icon--ei-sc-facebook {
fill: blue;
}
Roadmap
- Custom icons
- More styles
Top Related Projects
The iconic SVG, font, and CSS toolkit
Simply beautiful open-source icons
Premium hand-crafted icons built by Ionic, for Ionic apps and web apps everywhere 🌎
A scalable set of icons handcrafted with <3 by GitHub
Material Design icons by Google (Material Symbols)
✒7000+ Material Design Icons from the Community
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot