Koala logo Design
Esc
No matches for “
↑↓ navigate open Esc close
Components File upload

File upload

Styled drop-zone wrapper around a native file input. Posts as part of the surrounding form; supports drag-and-drop; validates max size client-side. Native chrome stays out of sight, consistent across browsers.

<koala-file-upload>
Canonical

Drag a file onto the zone, or click to open the native picker. The label updates with the chosen filename; oversize files reject with an inline error.

Variants

Single (image)
accept="image/*"

Multiple
multiple
Props
Attribute Values Notes
nameStringRequired. Form-field name on the hidden input.
acceptMIME listSame syntax as the native attribute. Optional.
multipleBooleanAllow selecting more than one file.
max-size-mbintClient-side cap. Server should still enforce it.
labelStringDrop-zone prompt. Defaults to "Drop a file or click to browse".
idStringOptional. Defaults to a sanitised version of name.