A simple iconfont componenet for vue.


iconfont is a Vector Icon Management & Communication Platform made by Alimama MUX.


1. Prepare iconfonts

Get your iconfonts from iconfont and then save in your porject.

1.1 Download zip

Select "Symbol" in your project page and then select "Download Code"

dowload icons

1.2 save iconfont.js

unpack downloading zip package and then copy file "iconfont.js" to your new project.
Files looks like below:

├── iconfont.js
└── main.js

2. install vicon

npm install vicon --save

After installing vicon, the whole project files looks like below:

├── iconfont.js
├── main.js
└── node_modules
    └── vicon
        └── ...

3. import

import and regist vicon/iconfonts in main.js.

import icon from 'vicon'
import './static/icon/iconfont'

Vue.component('icon', icon)

4. use icon

Using icon selected from iconfont in template.



  1. icon name could be found in demo_symbol.html which include in downloaded by step 1)
  2. you can open demo_symbol.html directly with web browser.
icon name