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.

Live

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.

6 props
PropTypeDefaultDescription
properties.multiplebooleanfalseEnables single or multiple file mode.
properties.valueFileProps | FileProps[]—Controlled preview record(s).
properties.onChangecallback—Receives preview records, native files, and validity.
properties.acceptFileExtType[]config defaultAccepted extensions or file categories.
properties.viewTypeUploaderFieldViewTypebackground / thumbsPreview layout style.
properties.maxFiles / maxSizenumberconfig defaultsFile count and size constraints.