Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dameety/vue-image-preview
An image input preview component in vuejs2
https://github.com/dameety/vue-image-preview
Last synced: about 2 months ago
JSON representation
An image input preview component in vuejs2
- Host: GitHub
- URL: https://github.com/dameety/vue-image-preview
- Owner: dameety
- License: mit
- Created: 2017-05-23T20:46:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-27T01:21:03.000Z (almost 7 years ago)
- Last Synced: 2024-03-24T05:20:58.611Z (2 months ago)
- Language: Vue
- Homepage:
- Size: 275 KB
- Stars: 18
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: License
Lists
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue. - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview
- awesome-vue - vue-img-preview ★11
- awesome-vuejs - vue-img-preview
README
# Vue-img-preview [![npm version](https://badge.fury.io/js/vue-img-preview.svg)](https://badge.fury.io/js/vue-img-preview) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/dameety/vue-image-preview/master/License) [![NPM](https://nodei.co/npm/vue-img-preview.png?downloads=true)](https://nodei.co/npm/vue-img-preview/)
This is a minimal image preview implementation that does only one thing; give users feedback by showing image chosen from a file input.
## looks like this (without the form)
![demo](https://cloud.githubusercontent.com/assets/10757330/26514483/148ab3b8-426a-11e7-8bd3-e40465e2509e.jpg)
## Installation
```
npm install vue-img-preview --save
```## Import
```
import Vue from 'vue'
import {vueImgPreview} from 'vue-img-preview'Vue.component('vue-img-preview', vueImgPreview)
```
## Browser Usage
```
Vue.component('vue-img-preview', vueImgPreview)
const vm = new Vue({
...
});```
## Then:
```
```
## Or Just:
```
```
## Props
| Name | Default | Type | Decsription |
|------|:--------:|------|-------------|
| input-name | file |String| name of the file input field
| default-image | |String| an image to display when the component loads before the user clicks the file input
| bg-color | #037B38 |String| background color of the select button
| text-color | #ffffff | String| color of the select text
| alt-text | vue img preview | String| alternative text for the image
| button-text | Choose an image | String| text to show on the button
| picker-style | Regular | String | how the image picker should be displayed. Button-text, text-color & bg-color won't work with this.