Skip to content

File upload

Examples

Basic Usage

js
<Mdx-file-upload label="File upload" />

Text uploaded

To customize the displayed text after files are uploaded, component property textUploaded is used.

js
<Mdx-file-upload textUploaded="Custom text" />

Start and End Icon Slots

The iconStart and iconEnd slots can be used to place icons on either side of the file-upload.

js
<Mdx-file-upload iconStart="startIcon" iconEnd="endIcon" label="Icon Slots" />

Validations

You can add validations by using Vuelidate value for v-model. Validations will be automatically parsed from v$

js
<Mdx-file-upload v-model="v$.variable" label="Datepicker" />

Properties

v-model

DescriptionYou can pass simple variable to v-model as well as Vueliade v$.variable to enabling validations
Type"Object" | "Boolean" | "null"
Requiredtrue

label

DescriptionThe visible label associated with the file-upload.
TypeString
Requiredtrue

disabled

DescriptionIf true, the user cannot interact with the file-upload.
TypeBoolean
Defaultfalse

size

DescriptionSize of the file-upload
Type"small" | "default"
Defaultdefault

multiple

DescriptionIf true, the user can select multiple files.
TypeBoolean
Defaultfalse