Relationship and Upload Inputs
RelationshipInput and UploadInput are the input-level interfaces used by Payload's relationship-backed fields. Use them when replacing a field component while preserving Payload's document-selection workflows.
Import
RelationshipInput
RelationshipInput selects documents from one or more Collections. Use appearance="select" for searchable inline results or appearance="drawer" to choose documents from a List Drawer.
UploadInput
UploadInput relates documents from an upload-enabled Collection. Its empty state includes Create New, Choose from existing, and drag-and-drop file intake when the current user has permission to create uploads.
This differs from Dropzone, which only handles incoming files and has no awareness of Collections or existing documents.
RelationshipInput props
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Identifies the selectable Collections. |
| | — | Identifies the form field. |
| | — | Selects one document or multiple documents. |
| | — | Supplies the controlled relationship value. |
| | — | Receives the updated relationship value. |
| | | Chooses inline search or List Drawer selection. |
| | | Allows creating related documents. |
| | | Allows opening selected documents for editing. |
| | — | Restricts selectable documents. |
| | | Enables reordering when |
| | | Disables selection and editing. |
UploadInput props
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Identifies the upload-enabled Collections. |
| | — | Identifies the form field. |
| | — | Supplies the controlled upload relationship. |
| | — | Receives the updated upload relationship. |
| | | Shows file creation when permissions allow it. |
| | | Allows multiple upload documents. |
| | — | Displays thumbnails for selected uploads. |
| | — | Limits selections in multi-value mode. |
| | — | Restricts documents shown in the List Drawer. |
| | | Disables selection, removal, and upload intake. |
* An asterisk denotes that a prop is required.
Provider requirements
These inputs are intended for Payload Custom Fields. They rely on the Admin Panel's Config, Auth, Translation, Locale, Modal, drawer, and document-event contexts. UploadInput also uses Payload's bulk-upload context. Use the complete RelationshipField or UploadField when Payload should manage the field configuration and form connection for you.
Was this page helpful?