resources/js/Components/Form/ImageUpload.vue
Use props to style the look of the component:
image?: string
Uploaded image.
placeholder?: string
Placeholder when there’s no image. Defaults to /img/placeholder.svg
accept?: string
Input file accept
attribute. Defaults to image/*
.
isIcon?: boolean
Set as true
for icon uploads.
For icon uploads default accept
value is image/png,image/svg+xml
btnLabel?: string
Label for image select button. Defaults to “Upload image”.
id?: HTMLAttributes["id"]
ID of the file input.
class?: HTMLAttributes["class"]
Style the wrapper.
When you select/upload an image, it will trigger the default change
event which will display uploaded image and emit custom changed
with file data. You can use this event to update your form.
You can render default component or customize it using the Vue slots.
resources/js/Components/Form/ImageUpload.vue
Use props to style the look of the component:
image?: string
Uploaded image.
placeholder?: string
Placeholder when there’s no image. Defaults to /img/placeholder.svg
accept?: string
Input file accept
attribute. Defaults to image/*
.
isIcon?: boolean
Set as true
for icon uploads.
For icon uploads default accept
value is image/png,image/svg+xml
btnLabel?: string
Label for image select button. Defaults to “Upload image”.
id?: HTMLAttributes["id"]
ID of the file input.
class?: HTMLAttributes["class"]
Style the wrapper.
When you select/upload an image, it will trigger the default change
event which will display uploaded image and emit custom changed
with file data. You can use this event to update your form.
You can render default component or customize it using the Vue slots.