@libertypie/vue-svg-img

A super lightweight vue library for injecting svg as inline

Usage no npm install needed!

<script type="module">
  import libertypieVueSvgImg from 'https://cdn.skypack.dev/@libertypie/vue-svg-img';
</script>

README

Intro

A super light weight and fast vue plugin for injecting svg as inline on runtime

Install

yarn

 yarn add @libertypie/vue-svg-img

npm

 npm i @libertypie/vue-svg-img

Usage

vue 2

    import vueSvgImg from 'vue-img-svg'

    Vue.use(vueSvgImg)

vue 3

    import vueSvgImg from 'vue-img-svg'
    createApp(App)
    .use(vueSvgImg)
    ...
    .mount('#app');

Using in template

    <img-svg src="https://libertypie.com/assets/img/logo.svg" class="logo" />