FileUploadInput
Open in StorybookInteractive Demo
Usage
vue
<script setup>
import { FileUploadInput } from '@yellowcard/b2b-design-system';
</script>
<template>
<FileUploadInput />
</template>API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
maxFileSize | number | 10 | in MB. Default is 10 |
fileLoading | number | -1 | The index of the file to display in its loading state e.g. when deleting |
errorMessage | string | '' | Externally supplied error message. Takes precedence over internal validation errors. |
label | string | 'Click to upload' | |
description | string | — | |
files | FileInfo[] | [] | |
acceptedTypes | string[] | ['image/jpeg', 'image/png', 'application/pdf'] | |
multiple | boolean | true | |
allowRemove | boolean | true | |
disabled | boolean | false | |
loading | boolean | false |
Events
| Event | Payload | Description |
|---|---|---|
selected-files | FileInfo[ | |
remove-file | number | |
view-file | number |