0.3.1 • Published 3 months ago

vue-image-svg v0.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Vue Image SVG

Universal Vue 3 component for images and SVGs with inline mode.

Install

NPM

npm install vue-image-svg

Register locally in your component

import { Image } from 'vue-image-svg';

export default {
    components: {
        Image
    }
};

Or register globally

import { createApp } from 'vue';

import Image from 'vue-image-svg';
import 'vue-image-svg/dist/style.css'; // for SVG coloring

const app = createApp(App);

app.use(Image);

Usage

<Image 
    src="image.svg" 
    alt="Best image ever!"
></Image>

props

- src

Path to image file

<Image src="/image.svg" />

- alt

An alternate text for an image, if the image cannot be displayed

<Image src="/image.svg" alt="Application Logo" />

- alternative-src

An alternate path for the image in case of a loading error

<Image src="/image.png" alternative-src="/image-2.png" alt="Application Logo" />

License

MIT License

0.3.0

3 months ago

0.3.1

3 months ago

0.2.1

4 months ago

0.2.0

5 months ago

0.1.8

5 months ago

0.1.2

7 months ago

0.1.7

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago