# [v-image](https://vinayakkulkarni.github.io/v-image/) 📷
[](https://github.com/vinayakkulkarni/v-image/actions/workflows/pipeline.yml)
[](https://github.com/geoql/doctor)
[](https://github.com/vinayakkulkarni/v-image/releases)
[](https://www.npmjs.com/package/v-image)
[](https://jsr.io/@vinayakkulkarni/v-image)
[](http://npm-stat.com/charts.html?package=v-image)
[](https://bundlephobia.com/package/v-image@latest)
[](https://github.com/vinayakkulkarni/v-image/blob/main/package.json)
[](./LICENSE)
[](https://github.com/voidzero-dev/vite-plus)
[](https://www.typescriptlang.org/)
[](https://pnpm.io/)
[](https://nodejs.org/)
⚠️ Docs are for Vue 3, for Vue 2 docs, check [this tree](https://github.com/vinayakkulkarni/v-image/tree/v2.6.1#readme)
## Demo
[](https://stackblitz.com/edit/v-image?file=src/App.vue)
## Features
- 💪 Built with [TypeScript](https://www.typescriptlang.org/)
- 🌠 Built with [Vue 3](https://vuejs.org/)
- ⚡ Zero dependencies.
## Table of Contents
- [v-image 📷](#v-image-)
- [Demo](#demo)
- [Features](#features)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Build Setup](#build-setup)
- [Usage](#usage)
- [Example](#example)
- [API](#api)
- [Props](#props)
- [Events](#events)
- [Contributing](#contributing)
- [Author](#author)
### Installation
```bash
pnpm add v-image
```
### Build Setup
```bash
# install dependencies
$ pnpm install
# package lib
$ pnpm run build
```
### Usage
Global component:
```js
// main.ts
import { VImage } from 'v-image';
import { createApp } from 'vue';
const app = createApp({});
app.component('VImage', VImage);
```
Or use locally
```js
// component.vue
```
For Nuxt 3, create a file in `plugins/v-image.ts`
```js
import { VImage } from 'v-image';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component('VImage', VImage);
});
```
then import the file in `nuxt.config.{j|t}s`:
```js
export default {
// ...
plugins: [
// ...
{ src: '~/plugins/v-image', mode: 'client' },
// ...
],
// ...
};
```
### Example
```html