Skip to content

File upload โ€‹

A drag-and-drop file uploader with previews, validation states and a built-in file list. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Single-file upload with default styling.

Vue SFC

Compact โ€‹

Reduced padding via variant="compact".

Vue SFC

Icon โ€‹

Replace the default ๐Ÿ“Ž with an iconify class via the icon prop (e.g. icon="i-mdi-cloud-upload"), or pass a slot="icon" child โ€” the slot wins over the prop. Use remove-icon for the file list's remove button.

Vue SFC

Multiple โ€‹

Allow multiple files with optional max-files / max-file-size.

Vue SFC

Image โ€‹

Image-only upload with previews.

Vue SFC

Validation โ€‹

Valid, invalid and warning states with messages.

Vue SFC

States โ€‹

Disabled and required examples.

Vue SFC

Preloaded โ€‹

Initialize the uploader with existing files.

Vue SFC

Event log โ€‹

Live log of mno-change, mno-remove and mno-error events.

Vue SFC

Customized โ€‹

Override per-element styling with the cssClass prop (Vue) or extra utility classes (CSS).

Vue SFC

Types โ€‹

Importimport { FileUploadProps } from 'mono-helper'
PropValueDefaultDescription
labelstring''Field label shown above the dropzone.
helperTextstring''Helper text shown below the dropzone.
placeholderstring'Klik atau seret file ke sini'Primary prompt text inside the dropzone.
subtextstring'Pilih file untuk diunggah'Secondary hint text inside the dropzone.
acceptstring''Accepted file types for the file input.
iconstring''Dropzone icon. An iconify utility class (e.g. `i-mdi-cloud-upload`) renders the icon; any other string renders as text/emoji. A `slot="icon"` child takes priority over this prop.
removeIconstring''Remove (โœ•) button icon โ€” iconify class or text.
multiplebooleanfalseAllows selecting multiple files at once.
disabledbooleanfalseDisables interaction and dims the component.
requiredbooleanfalseMarks the field as required with an indicator.
dragdropbooleantrueEnables drag-and-drop file selection.
maxFileSizenumber0Maximum allowed size per file, in bytes.
maxFilesnumber0Maximum number of files allowed.
modelValueFileUploadItem[][]Two-way bound list of selected files.
variant'default' | 'compact''default'Layout style: default or compact.
validationState'warning' | 'default' | 'valid' | 'invalid''default'Validation state styling the component.
validationMessagestring''Validation message shown below the dropzone.
cssClassFileUploadCssClass{}Per-element class overrides for internal parts.