Form fields·loomora/UploaderField
⚙Related configs↗UploaderField
An upload surface that validates files and renders selected files using thumbnail, list, background, or profile-picture layouts.
Interactive live playground
Tweak props, change states, and see the live component respond in real time.
How to call
Import directly from the Loomora package root. For projects without Tailwind CSS, ensure loomora/dist/index.css is imported once in your root layout.
import { UploaderField } from 'loomora'
<UploaderField label="Attachments" properties={{
multiple: true, value: files, onChange: (next) => setFiles(next),
accept: ['image', '.pdf'], maxFiles: 3, viewType: 'list',
}} />API reference
Important public props and how they affect rendering.
| Prop | Type | Default | Description |
|---|---|---|---|
| properties.multiple | boolean | false | Enables single or multiple file mode. |
| properties.value | FileProps | FileProps[] | — | Controlled preview record(s). |
| properties.onChange | callback | — | Receives preview records, native files, and validity. |
| properties.accept | FileExtType[] | config default | Accepted extensions or file categories. |
| properties.viewType | UploaderFieldViewType | background / thumbs | Preview layout style. |
| properties.maxFiles / maxSize | number | config defaults | File count and size constraints. |