@craydel-v3/craydel-image-uploader
v1.0.6
Published
A custom Vuetify image uploader component for Craydel.
Downloads
14
Maintainers
Readme
CraydelImageUploader
Installation
Get the latest version by NPM:
$ npm i @craydel-v3/craydel-image-uploader
Component Import
Import the module chosen directly in your component
<script>
import CraydelImageUploader from "@craydel-v3/craydel-image-uploader/src/CraydelImageUploader.vue";
export default {
components: {CraydelImageUploader}
}
</script>
Props
| Name | Type | Default | Description | |-------------------|------------------|-----------|--------------------------------------------------------------------------------------------------------------------------| | id | string | random ID | Sets the DOM id on the component. | | height | number | string | undefined | Sets the height for the image preview. | | width | number | string | undefined | Sets the width for the image preview. | | max-height | number | string | undefined | Sets the maximum height for the image preview. | | max-width | number | string | undefined | Sets the maximum width for the image preview. | | min-height | number | string | undefined | Sets the minimum height for the image preview. | | min-width | number | string | undefined | Sets the minimum width for the image preview. | | aspect-ratio | number | string | undefined | Calculated as width/height, so for a 1920x1080px image this will be 1.7778. Will be calculated automatically if omitted. | | cover | boolean | false | Resizes the background image to cover the entire container. | | placeholder-image | boolean | false | Sets the placeholder image. |
Usage
An example showing an image uploader.
<craydel-image-uploader></craydel-image-uploader>