vue-svg-component-creator
v0.2.2
Published
Utill for create vue svg component
Downloads
12
Readme
vue-svg-component-creator
vue-svg-component-creator is build util for create Vue.js component with collection based on svg files. Using as alternative of svg sprites in Vue.js application.
Advantages
- Full controll of svg
- There is no need svg polyfills
- Correct rendering in IE11 (Known issue when updating components)
Installation
npm i -D vue-svg-component-creator
Usage
Before build your project:
const VSVGComponentCreator = require('vue-svg-component-creator');
// Will be crated Vue component with name 'vSvg.js'
VSVGComponentCreator.createComponent(pathToIcons, pathToNewComponent)
In project:
import VSvg from './vSvg.js';
Vue.component('vSvg', VSvg);
In template:
svgName
equal svg fileName without extension
<v-svg name="svgName"></svg>