vue-image-drop-form
v0.1.6
Published
A Vue 3 component for easy image selection, drag-and-drop, and preview.
Downloads
2
Readme
Vue Image Drop Form
A simple Vue 3 component for image file selection, drag-and-drop, and preview functionality.
Table of Contents
Installation
Install the package using npm:
npm install vue-image-drop-form
Or using yarn:
yarn add vue-image-drop-form
Usage
Here is a simple example:
import VueImageDropForm from 'vue-image-drop-form'
// In your Vue component
<VueImageDropForm label="Upload Image" @change="handleImageChange" />
Props
label
: The label for the file input.
Events
change
: Emitted when a file is selected or dropped. The selectedFile
object is passed as an argument.
Running Tests
To run tests, execute the following command:
npm run test