All Projects → antonreshetov → Vue Unicons

antonreshetov / Vue Unicons

Licence: mit
1000+ Pixel-perfect svg icons for your next project as Vue components

Projects that are alternatives of or similar to Vue Unicons

Tabler Icons
A set of over 1400 free MIT-licensed high-quality SVG icons for you to use in your web projects.
Stars: ✭ 10,858 (+1211.35%)
Mutual labels:  svg, icons, svg-icons, icon-pack, iconset
Coreui Icons
CoreUI Free Icons - Premium designed free icon set with marks in SVG, Webfont and raster formats
Stars: ✭ 1,813 (+118.96%)
Mutual labels:  svg, icons, svg-icons, icon-pack, iconset
Simple Icons
SVG icons for popular brands
Stars: ✭ 12,090 (+1360.14%)
Mutual labels:  svg, icons, svg-icons, icon-pack, iconset
vector-icons
Free Vector icons for Website and Mobile App
Stars: ✭ 28 (-96.62%)
Mutual labels:  icons, icon-pack, svg-icons, iconset
majesticons
A versatile, beautiful, and scalable iconset. 760 icons each in line and solid style.
Stars: ✭ 98 (-88.16%)
Mutual labels:  icons, icon-pack, svg-icons, iconset
Phosphor Icons
A flexible icon family for the web
Stars: ✭ 56 (-93.24%)
Mutual labels:  svg, icons, svg-icons, icon-pack
icons-flat-osx
Free Flat icons For OSX
Stars: ✭ 371 (-55.19%)
Mutual labels:  icons, icon-pack, svg-icons, iconset
Phosphor React
A flexible icon family for React
Stars: ✭ 97 (-88.29%)
Mutual labels:  svg, icons, svg-icons, icon-pack
Boxicons
High Quality web friendly icons
Stars: ✭ 1,104 (+33.33%)
Mutual labels:  svg, icons, svg-icons, icon-pack
Circle Flags
A collection of 300+ minimal circular SVG country flags
Stars: ✭ 139 (-83.21%)
Mutual labels:  svg, icons, svg-icons, icon-pack
Browser Logos
🗂 High resolution web browser logos
Stars: ✭ 5,538 (+568.84%)
Mutual labels:  svg, icons, svg-icons, iconset
Icons Flat Osx
Free Flat icons For OSX
Stars: ✭ 366 (-55.8%)
Mutual labels:  icons, svg-icons, icon-pack, iconset
Vue Eva Icons
Is a pack of more than 480 beautiful open source Eva icons as Vue components
Stars: ✭ 189 (-77.17%)
Mutual labels:  svg, icons, vue-components, svg-icons
Bytesize Icons
Tiny style-controlled SVG iconset (101 icons, 12kb)
Stars: ✭ 3,662 (+342.27%)
Mutual labels:  svg, icons, svg-icons, iconset
react-crud-icons
57 SVG icons for CRUD applications, packaged as a React component with light & dark themes and tooltip.
Stars: ✭ 19 (-97.71%)
Mutual labels:  icon-pack, svg-icons, iconset
semicon
A collection of icons for the Semantic Web and Linked Open Data world.
Stars: ✭ 20 (-97.58%)
Mutual labels:  icons, icon-pack, iconset
Vectorlogozone
3,000+ gorgeous SVG logos, perfect for your README or credits page
Stars: ✭ 239 (-71.14%)
Mutual labels:  svg, icons, svg-icons
phosphor-figma
A flexible icon family for Figma
Stars: ✭ 17 (-97.95%)
Mutual labels:  icons, icon-pack, svg-icons
icons
A world of famous icon packs with easy to use interface
Stars: ✭ 21 (-97.46%)
Mutual labels:  icons, icon-pack, iconset
React Kawaii
Cute SVG React Components
Stars: ✭ 2,709 (+227.17%)
Mutual labels:  svg, icons, svg-icons

logo of vue-unicons repository

1000+ Pixel-perfect svg unicons for your next project as Vue components

Supporting

Vue Unicons is open source project and completely free to use.

If you like the project, you can donate to support the development via the following methods:

Donate via Patreon Donate via PayPal Donate via Bitcoin

Demo

https://antonreshetov.github.io/vue-unicons

Developed with love for developers

A simple way to add the necessary icons and install them.

demo

Install

NPM

Installing with npm is recommended and it works seamlessly with webpack.

npm i vue-unicons

Download

You can download latest version from the Github: Download

Quick start

Global

To use in your project:

  1. Import vue-unicons
  2. Grab the icons you want and add then into Unicon library
  3. Install Unicon into Vue

main.js

Vue 3

import { createApp } from 'vue'
import App from './App.vue'
import Unicon from 'vue-unicons'
import { uniLayerGroupMonochrome, uniCarWash } from 'vue-unicons/dist/icons'

Unicon.add([uniLayerGroupMonochrome, uniCarWash])

createApp(App).use(Unicon).mount('#app')

Vue 2

import Vue from 'vue'
import App from './App.vue'
import Unicon from 'vue-unicons/dist/vue-unicons-vue2.umd'
import { uniLayerGroupMonochrome, uniCarWash } from 'vue-unicons/dist/icons'

Unicon.add([uniLayerGroupMonochrome, uniCarWash])
Vue.use(Unicon)

new Vue({
  render: h => h(App)
}).$mount('#app')

App.vue

Use the name of icon without the uni prefix, icon style and in the kebab-case:
uniCarWash -> car-wash
uniLayerGroupMonochrome -> layer-group

<template>
  <div>
    <unicon name="car-wash" fill="limegreen"></unicon>
    <unicon name="layer-group" fill="royalblue" icon-style="monochrome"></unicon>
  </div>
</template>

Config

You can configure the icons globally. Simply specify the required parameters during installation.

...
createApp(App)
  .use(Unicon, {
    fill: 'deeppink',
    height: 32,
    width: 32
  })
  .mount('#app')

Add custom icons

No icons you need? No problem, you can add custom svg icons.

custom-icons.js

// Always use a prefix to avoid coincidence with existing icons.
export const myCustomIcon = {
  name: 'my-custom-icon',
  style: 'line',
  path: '<path d="M16.327 10.775a.312.312 0 0...</path>' // Copy everything inside the svg tag of the icon you want and past there
}

For correct positioning of svg icon please make sure that the icon to be added has viewBox="0 0 X X"

main.js

import { createApp } from 'vue'
import App from './App.vue'
import Unicon from 'vue-unicons'
import { uniLayerGroupMonochrome, uniCarWash } from 'vue-unicons/dist/icons'
import { myCustomIcon } from './custom-icons'

Unicon.add([uniLayerGroupMonochrome, uniCarWash, myCustomIcon])

createApp(App).use(Unicon).mount('#app')

App.vue

<template>
  <div>
    <unicon name="constructor" fill="royalblue"></unicon>
    <unicon name="car-wash" fill="limegreen"></unicon>
    <unicon name="my-custom-icon" fill="royalblue" />
  </div>
</template>

See example

Nuxt

Installation in Nuxt is almost the same, except that you need to create a separate file in the plugins folder:

plugins/vue-unicons.js

import Vue from 'vue'
import Unicon from 'vue-unicons/dist/vue-unicons-vue2.umd'
import { uniLayerGroupMonochrome, uniCarWash } from 'vue-unicons/dist/icons'

Unicon.add([uniLayerGroupMonochrome, uniCarWash])
Vue.use(Unicon)

Then we add the file path inside the plugins key in nuxt.config.js, and set mode: 'client' to make vue-unicons work only in a browser.

  ...
  plugins: [
    { src: '~/plugins/vue-unicons', mode: 'client' }
  ]
  ...
<template>
  <div>
    <client-only>
      <unicon name="car-wash" fill="limegreen"></unicon>
      <unicon name="layer-group" fill="royalblue" icon-style="monochrome"></unicon>
    </client-only>
  </div>
</template>

Props

Name Description Type Accepted values Default value
name Icon name string - -
width Width of icon string - -
height Height of icon string - -
fill Fill color of icon string HEX or color name -
icon-style Icon style string line / monochrome line

Events

Name Description Payload
click Triggered when icon was clicked -

License

Vue Unicons licensed under MIT.

Unicons licensed under Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].