vue-svg-component-creator

0.2.2 • Public • Published

vue-svg-component-creator

version license

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>

Change log

Readme

Keywords

Package Sidebar

Install

npm i vue-svg-component-creator

Weekly Downloads

1

Version

0.2.2

License

MIT

Last publish

Collaborators

  • mbraint