Indielayer UI - Vue.js 3 / Nuxt.js 3 UI Library with Tailwind CSS 4. ⚡️  Build and prototype fast web applications.

Indielayer
Indielayer UIIndielayer UI
UI
v2.1.0

Upload

File picker with drag-and-drop for selecting one or more files to upload. Use Upload when forms need images, documents, or other file input with accept filters.

#
Usage

Basic example with common props.

#API

Upload

props

Name
Description
Type
Default
Values
Required
disabled
Disables interaction and applies disabled styling.
Boolean
false
loading
Shows a loading indicator and blocks interaction.
Boolean
false
loadingLabel
Accessible label announced while loading.
String
loadingStatus
Loader visual status (for example active or indeterminate).
String
active
modelValue
Bound value (v-model).
String
Number
Boolean
Object
Array
id
Native id attribute for the input element.
String
name
Native name attribute for form submission.
String
readonly
Makes the field read-only without disabling it.
Boolean
false
required
Marks the field as required for validation.
Boolean
false
validateOnInput
Runs validation on each input event when true.
Boolean
true
label
Visible label text for the field.
String
helper
Helper text shown below the field.
String
error
External error message; overrides rule errors when set.
String
hideFooter
Hides the footer area (helper / error).
Boolean
false
rules
Validation rule functions or rule descriptors.
Array
() => []
tooltip
Optional tooltip text next to the label.
String
skipFormRegistry
Skips registering this field with a parent x-form.
Boolean
false
placeholder
Text shown in the default drop zone.
String
accept
Accepted file types (native `accept` attribute).
String
multiple
Allows selecting more than one file.
Boolean
false
maxFiles
Maximum number of files allowed.
Number
String
maxFileSize
Maximum file size in bytes.
Number
String
variant
Visual variant of the upload control.
String
box
box
action
URL to upload files to; enables remote upload mode when set.
String
headers
Additional HTTP headers sent with the upload request.
Object
method
HTTP method used when uploading to `action`.
String
POST
withCredentials
Sends cookies/credentials with the upload request.
Boolean
false
fileFormDataName
FormData field name for each uploaded file.
String
file

slots

Name
Description
box
Custom drop zone UI (`is-over` when dragging files).
files
Custom file list (`files` upload state array).
removeIcon
Icon for the remove-file control.

emits

Name
Description
update:modelValue
Emitted when the bound value changes (v-model).
blur
Emitted when the field loses focus.
focus
Emitted when the field receives focus.
input
Emitted on native input events.
change
Emitted when the value is committed (change).
upload
Emitted when a file finishes uploading (remote mode).
remove
Emitted when a file is removed from the list.

methods

Name
Description
focus
Focus the underlying control.
blur
Remove focus from the underlying control.
reset
Reset the field value and validation state.
validate
Run validation rules and return whether the field is valid.
setError
Set an external error message on the field.