NEURALNG

PUBLIC CONTRACT

FileUpload API

The complete beta contract for selection, validation, state and visual ownership.

Inputs

InputTypeDefaultPurpose
valuereadonly File[][] Immutable selected-file model.
acceptstring'' Native and client-side MIME/extension filter.
multiplebooleanfalse Append multiple accepted files.
maxFileSizenumber | undefinedundefined Maximum bytes per file.
maxFilesnumber | undefinedundefined Maximum selected count.
allowDuplicatesbooleanfalse Allows identical file identities.
disabledbooleanfalse Blocks every interaction.
readonlybooleanfalse Shows selection but blocks mutations.
requiredbooleanfalse Exposes required state and ARIA.
invalidbooleanfalse Exposes invalid presentation and ARIA.
pendingbooleanfalse Exposes busy state.
touchedbooleanfalse External form-state hook.
dirtybooleanfalse External form-state hook.
fluidbooleanfalse Fills available inline width.
showFileListbooleantrue Shows selected file rows.
namestring'' Native file input name.
capturestring'' Native capture hint.
uploadIdstring'' Explicit control ID outside Field.
ariaLabelstring'' Accessible name.
ariaLabelledBystring'' Visible-label relationship.
chooseFileLabelstring'' Single chooser override.
chooseFilesLabelstring'' Multiple chooser override.
dropFileLabelstring'' Single drop text override.
dropFilesLabelstring'' Multiple drop text override.
removeButtonLabelstring'' Visible remove text override.
clearFilesLabelstring'' Clear action override.
emptyFilesLabelstring'' Empty state override.
chooseIconClassstring'' Chooser Neural Icon class.
removeIconClassstring'' Remove Neural Icon class.
clearIconClassstring'' Clear Neural Icon class.
unstyledbooleanfalse Removes NeuralNg visual classes.
fileUploadClassstring'' Consumer root class.
inputClassstring'' Consumer native input class.
dropzoneClassNamestring'' Consumer dropzone class.
fileListClassNamestring'' Consumer list class.
classesNeuralFileUploadClasses{} Typed visual slots.

Events

EventPayloadMeaning
valueChangereadonly File[] Generated model output.
selectionChangeNeuralFileSelectionChange Accepted/rejected user selection.
filesRejectedNeuralFilesRejectedEvent Focused rejection event.
fileRemovedNeuralFileRemoveEvent User removed one file.
clearedNeuralFileClearEvent User cleared the selection.
touchvoid Blur or completed user selection.

Methods

openFileDialog()

Opens the native file chooser.

focus(options?)

Focuses the visible choose button.

clear()

Clears programmatically without user-action events.

reset()

Clears value and transient drag state.

formatFileSize(bytes)

Formats bytes through the active locale.

Typed class slots

rootinputdropzonedropzoneIcondropzoneTextchooseButtoncontentfileListfileItemfileInfofileNamefileMetaremoveButtonremoveIconclearButtonclearIconemptymessage

Value and event contract

Every mode uses readonly File[]. Programmatic clear() and reset() do not impersonate user actions. User selection emits one detailed event even when all candidates are rejected.