• Stars
    star
    1,799
  • Rank 24,886 (Top 0.6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated over 1 year ago

Reviews

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

Repository Details

a JavaScript library which is built to easily customize and use the SVG Icons with a blaze.

Vivid.JS Logo

Check Beautiful Doc on Website.


Introduction

Vivid.JS is an SVG Icons library which can be used to add highly customizable vibrant icons to the DOM without any dev dependencies.

Vivid.JS is easy to adapt and can bring SVG icons to life using html5 data attributes on the go. Icons can also be individually customized in terms of colors and size using html5 data attributes which gives more power to Vivid.JS library.

Vivid.JS SVG Icons ca be download and customized as per needs in different designing softwares like Photoshop and Sketch as well.

Download Vivid.JS Icons for Sketch

Download Vivid.JS Icons for Photoshop

Getting Started

To get started with Vivid.JS, you just need to include vivid-icons.min.js to your project.

Installation

Compiled vivid-icons.min.js JavaScript minified file can be directly linked from jsDelivr or UNPKG CDN or Vivid.JS can be included within your workflow using your favorite package managers as well.

Link from jsDelivr (Recommended) or UNPKG CDN

You can include Vivid Icons JavaScript file in the header section of your document as shown below -

<script src="https://cdn.jsdelivr.net/npm/[email protected]" type="text/javascript"></script>

or

<script src="https://unpkg.com/[email protected]" type="text/javascript"></script>

Package Managers

You can use either npm, yarn or bower to get the Vivid.JS package

Copy and Paste the command below in your terminal to get package with npm -

npm install vivid-icons

Copy and Paste the command below in your terminal to get package with yarn -

yarn add vivid-icons

Copy and Paste the command below in your terminal to get package with bower -

bower install vivid-icons

Usage

Including icons with Vivid.JS is very easy and quick to use.

Using an Icon

An SVG Icon can be easily included using the syntax <i data-vi="icon-name"></i> , where icon-name is replaced by the unique name of the respective icon.

Example Code

<i data-vi="doc"></i>

Customizing Icon Size

To customize the size of the respective icon, Add data-vi-size="number" data attribute to i element to customize size of the icon.

Example Code

<i data-vi="doc" data-vi-size="96"></i>

Customizing Icon Colors

Each Vivid Icon has upto three colors which are primary, accent and prop. Each color can be customized respectively using data attributes.

Add data-vi-primary="#hexcode" data attribute to customize the primary color of the icon.

Add data-vi-accent="#hexcode" data attribute to customize the accent color of the icon.

Add data-vi-prop="#hexcode" data attribute to customize the prop color of the icon.

Example Code

<i data-vi="doc" data-vi-primary="#2B13C1" data-vi-accent="#00ECB1" data-vi-prop="#CEFAFF"></i>

Icon Customization

Oh! Yes, You can customize the default size and colors of the Vivid.JS SVG Icons Library.

Install Node.js

First of all you need to install the latest version of Node.js (if you don't have it pre-installed), once you are over with Node.js installation, open up terminal and verify everything has setup correctly by running npm -v and it should return with something like 5.x.x

Create your Project

  • Open terminal and create your project directory with mkdir project-name command.
  • Go to your project directory using cd project-name command.
  • Initialize your project by npm init command and enter the necessary details.

Install Vivid.JS Package

Install Vivid.JS SVG Icons Package with npm package manager using the command below -

npm install vivid-icons

Once, the vivid-icons is installed as a node module, go to node_modules/vivid-icons directory using cd node_modules/vivid-icons command and install vivid-icons dependencies with npm install.

Customize Icons

Go to src directory of the installed package and open config.js file.

config.js file looks like

export let iconConfig = { 
    size: "48", 
    primaryColor: "#FF6E6E", 
    accentColor: "#0C0058", 
    propColor: "#FFFFFF" 
 } 

Update the respective property values which needs to be changed.

Compile Vivid.JS Icons

Once you are done with updates in config.js head back to the terminal and run the following command -

npm run build

Voila! You're done

Once the compilation process is over, your browser will fire up to show the compiled Vivid SVG Icons in your browser from the ./dist/preview.html file.

If you are using Windows environment replace the "open-html": "open ./dist/preview.html" with "open-html": "show ./dist/preview.html" in package.json file.

Adding Icons

If you wish to create your very own Vivid.JS with your custom icons, Follow the steps below -

Once you have installed Vivid.JS, add/replace/remove the icons from ./icons directory

Make sure the SVG Icons which has been added must have vi-primary and vi-accent class to the respective SVG Elements, so that the colors can be customized later from src/config.js.

Example Code

<svg id="chat" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
    <defs>
        <style>
        .vi-primary {
            fill: #ffb400;
        }

        .vi-accent {
            fill: #070c2b;
        }
        </style>
    </defs>
    <path class="vi-primary" d="M24,39.765A18.556,18.556,0,0,1,13.924,37.1L7,44V23.882l0.012,0.006C7.011,23.791,7,23.7,7,23.6,7,14.369,13.247,8,24,8s17,6.652,17,15.882S34.753,39.765,24,39.765Z"/>   
    <path class="vi-accent" d="M31.994,20.99a3,3,0,1,1-3,3A3,3,0,0,1,31.994,20.99ZM24,21a3,3,0,1,1-3,3A3,3,0,0,1,24,21Zm-8,0a3,3,0,1,1-3,3A3,3,0,0,1,16,21Z"/>   
</svg>

Go to the root directory of vivid-icons and execute npm run build command from terminal.

Credits

© Copyright 2018 Webkul Software, All rights reserved.

More Repositories

1

coolhue

Coolest Gradient Hues and Swatches
JavaScript
3,452
star
2

micron

a [μ] microInteraction library built with CSS Animations and controlled by JavaScript Power
CSS
2,316
star
3

csspin

CSS Spinners and Loaders - Modular, Customizable and Single HTML Element Code for Pure CSS Loader and Spinner
CSS
1,041
star
4

myscale

myScale - Quick SVG Icon Resizer
JavaScript
128
star
5

magento2-code-generator

PHP
39
star
6

magento2-varnish-redis-ssl-docker-compose

Deploy Magento2 with Varnish Cache and Redis with SSL termination using Docker-compose tool
VCL
38
star
7

mobikul-standalone-pos

It is a standalone POS application, the user can simply download the application and start selling the products without any dependency on the server or website.
Java
32
star
8

beedii

Free Hand Drawn Emoji Font - Beedii
25
star
9

mojoicons

Handcrafted 100 Outline and Flat Icons for Free -
24
star
10

magento2-docker-compose

Magento 2 with Docker Compose
Shell
19
star
11

renamer

Sketch Plugin to rename multiple selected layers or groups or artboards at once
JavaScript
16
star
12

qloapps_docker

Dockerize version of QloApps v1.5.0, an open source Hotel Commerce Solution
Dockerfile
15
star
13

cssemoji

Colorful Animated CSS Emoji
CSS
10
star
14

MobikulFBSignI

Swift
9
star
15

magento2_vscode

Magento2 vscode
JavaScript
9
star
16

magento2-varnish-docker-compose

Magento 2 integration with Varnish Cache using Docker-compose tool
VCL
8
star
17

magento2-custom-command

Magento2 Webkul Custom Command Module - allow to create your own custom commands, and here we created command to delete orders
PHP
5
star
18

magento2_product_carousel_widget

The extension Product Carousel Widget for Magento 2 will allow you to display your products in a very elegant carousel style. The module allows you to put different product ids (separated by comma) and each product is linkable to a separate product.
JavaScript
5
star
19

docker_opencart

PHP
4
star
20

magento2_customlog

Magento2 Custom Log File Using Monolog
PHP
4
star
21

multi-vendor-marketplace-lite-for-woocommerce

Multi-Vendor Marketplace Lite for WooCommerce https://wordpress.org/plugins/multi-vendor-marketplace-lite-for-woocommerce/
PHP
4
star
22

Vagrant_qloapps

Vagrant Shell Provisioning For QloApps v1.5.1
Shell
3
star
23

opencart_setup

Console App To Create Opencart Setup through Command Line
PHP
3
star
24

Magento-Bootstrap

Twitter Bootstrap Magento Template - Bootstrap is really a brilliant CSS framework and saves tons of time if you are creating UI/UX design . WebKul is proudly announcing the ”Bootstrap Magento Template” free of cost and its totally open source . This is the alpha version of the “bootstrap magento theme” lets us know your valuable feedback so that we can improve it
CSS
3
star
25

LAMP-WITH-PRESTASHOP

PHP
2
star
26

christmas

Christmas Goodies Crafted with ❤️ at Webkul Design
HTML
2
star
27

magento2_cartPageAdditionalInfo

PHP
2
star
28

odoo-posbox

This repo contains image for ODOO POSBOX having nginx enabled i.e working with https.
2
star
29

savicon

Font with Useful Icons
1
star
30

magento2_ajax_contact_form

Magento2 Ajax Contact Form
PHP
1
star
31

booking-commerce-wordpress

Wordpress extension for Booking Commerce
PHP
1
star
32

uxem

Empathy map tool for UX designers to visualise and organise user's behaviour
1
star
33

magento2_docker

Dockerized Image of magento2
PHP
1
star
34

Joomla-Fancy-Image-Transition

Joomla fancy Image transition is joomla 1.5 native extension and have enormous features like slideshow ,picture gallery and dozens
1
star
35

orocommerce

Shell
1
star
36

magento2_verticalproductslider

Magento2 Vertical Product Slider - allow to display products in vertical Slider with magento2 system configuration and block code https://store.webkul.com/
HTML
1
star
37

woocommerce-salesforce-connector

This plug-in provide integration between Wordpress WooCommerce and Salesforce.
PHP
1
star
38

woocommerce-google-chrome-autologin

WooCommerce Google Chrome Smart Lock facilitates the customer, store owner to login with saved password in their systems.The admin can allow to save password to their and login with that password. No need to remember password.
PHP
1
star
39

docker_magento

PHP
1
star
40

Docker_wordpress

Dockerize Your Wordpress
PHP
1
star