Skip to Content
CustomizeModel UIDeposit form components

Deposit Form Components

This page documents the available form components for customizing record deposit forms. For field metadata and the useFieldData hook, see Deposit form. For search result components, see Search result components.

Basic Components

TextField

Standard text input component from oarepo-ui with automatic field metadata integration:

import { TextField } from "@js/oarepo_ui/forms"; <TextField fieldPath="metadata.title" />

Automatically applies field metadata from your model YAML, XSS protection, and Formik integration.

Source: oarepo-ui/forms/components/TextField 

Based on: react-invenio-forms.TextField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Dot-separated path to field in form state
fieldRepresentationstring"full"Label display mode passed to useFieldData: "full", "compact", "text"
iconstring"pencil"Icon to display with field (passed to useFieldData)
optimizedbooleantrueUse FastField for performance (only re-renders this field)

StringArrayField

Array of text inputs with add/remove functionality:

import { StringArrayField } from "@js/oarepo_ui/forms"; <StringArrayField fieldPath="metadata.keywords" addButtonLabel="Add keyword" />

Source: oarepo-ui/forms/components/StringArrayField 

Based on: react-invenio-forms.ArrayField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Formik path to the array value
labelstring | nodenullLabel displayed above the field
requiredbooleanfalseMarks the field as required
defaultNewValuestring""Value inserted when a new element is added
addButtonLabelstring | node(i18n)Text shown on the “Add” button
helpTextstring""Supplemental description rendered below inputs
labelIconstring""Icon name displayed next to the label
showEmptyValuebooleanfalseAuto-add empty entry on first render
iconstringnullIcon passed to field data wrapper
fieldRepresentationstring"text"Field representation mode for useFieldData

Date Fields

Extended Date/Time Format (EDTF) compliant date pickers:

import { EDTFSingleDatePickerField, EDTFDateRangePickerField, } from "@js/oarepo_ui/forms"; // Single date <EDTFSingleDatePickerField fieldPath="metadata.publication_date" /> // Date range with single/range toggle <EDTFDateRangePickerField fieldPath="metadata.date_range" />

Source: oarepo-ui/forms/components/EDTFDatePickerField 

Based on: Formik useField, react-datepicker

EDTFSingleDatePickerField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Path to the field in Formik form state
labelstring | nodefrom schemaField label
helpTextstringfrom schemaHelper text below the input
requiredbooleanfalseMarks field as required
placeholderstringfrom schemaPlaceholder shown when no date selected
datePickerPropsobject{}Props forwarded to underlying date-picker
customInputPropsobject{}Props passed to custom input element
iconstring"calendar"Icon displayed next to label

EDTFDateRangePickerField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Path to the field in Formik form state
labelstring | nodefrom schemaField label
iconstring"calendar"Icon displayed next to label
helpTextstringfrom schemaHelper text below the input
requiredbooleanfalseMarks field as required
dateRangeInputPlaceholderstring(i18n)Placeholder for range mode
singleDateInputPlaceholderstring(i18n)Placeholder for single date mode
datePickerPropsOverridesobject{}Override underlying date-picker props

I18n Fields

I18nTextInputField

Internationalized text field with language selector:

import { I18nTextInputField } from "@js/oarepo_ui/forms"; <I18nTextInputField fieldPath="metadata.title" usedLanguages={["en", "cs"]} lngFieldWidth={3} />

Source: oarepo-ui/forms/components/I18nTextInputField 

Based on: react-invenio-forms.GroupField, react-invenio-forms.TextField, oarepo-ui.LanguageSelectField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Base path for the multilingual value
optimizedbooleantrueUse optimized rendering mode
lngFieldWidthnumber3Width of language selector (columns)
usedLanguagesarray[]Already used language codes to exclude

I18nRichInputField

Internationalized rich text editor:

import { I18nRichInputField } from "@js/oarepo_ui/forms"; <I18nRichInputField fieldPath="metadata.description" editorConfig={{ minHeight: 150 }} />

Source: oarepo-ui/forms/components/I18nRichInputField 

Based on: react-invenio-forms.RichInputField, react-invenio-forms.GroupField, oarepo-ui.OarepoRichEditor

Props:

PropTypeDefaultDescription
fieldPathstring(required)Base path for the multilingual field
optimizedbooleantrueEnable form-level optimizations
editorConfigobject{}Configuration for rich-text editor
lngFieldWidthnumber3Width of language selector (columns)
usedLanguagesarray[]Already used language codes to exclude

MultilingualTextInput

Wrapper for multiple language entries with automatic language management:

import { MultilingualTextInput } from "@js/oarepo_ui/forms"; <MultilingualTextInput fieldPath="metadata.titles" rich={false} addButtonLabel="Add another language" showEmptyValue={true} />

Source: oarepo-ui/forms/components/MultilingualTextInput 

Based on: react-invenio-forms.ArrayField, oarepo-ui.I18nTextInputField, oarepo-ui.I18nRichInputField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Path to the form field
labelIconstringnullIcon name for field label
defaultNewValueobject{lang:"", value:""}Default for new language entry
richbooleanfalseUse rich-text editor instead of plain text
addButtonLabelstring(i18n)Label for “add language” button
lngFieldWidthnumber(from config)Width of language selector
showEmptyValuebooleanfalseShow empty input when no values
prefillLanguageWithDefaultLocalebooleanfalsePrefill new language with default locale
removeButtonLabelClassNamestring""CSS class for remove button label
displayFirstInputRemoveButtonbooleantrueShow remove button on first input

LanguageSelectField

Language selection dropdown with search and filtering:

import { LanguageSelectField } from "@js/oarepo_ui/forms"; <LanguageSelectField fieldPath="metadata.language" usedLanguages={["en"]} />

Source: oarepo-ui/forms/components/LanguageSelectField 

Based on: react-invenio-forms.SelectField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Path to the field in Formik values
labelstring | node(i18n)Field label
labelIconstring"globe"Icon name for label
requiredbooleanfalseMarks field as required
placeholderstring(i18n)Placeholder text
clearablebooleantrueAllow clearing selection
usedLanguagesarray[]Already used languages (hidden unless selected)

Person/Contributor Fields

CreatibutorsField

Array field for creators/contributors with drag-and-drop reordering and modal editor:

import { CreatibutorsField } from "@js/oarepo_ui/forms"; <CreatibutorsField fieldPath="metadata.creators" schema="creators" showRoleField={true} />

Source: oarepo-ui/forms/components/CreatibutorsField 

Based on: react-invenio-forms.FieldArray, react-dnd

Props:

PropTypeDefaultDescription
fieldPathstring(required)Path to store the array
schema"creators" | "contributors"(required)Type of field (affects labels)
labelstring(i18n)Field label
iconstring"user"Icon for field label
showRoleFieldbooleanfalseShow role selector for each item
requiredbooleanfalseMarks field as required
addButtonLabelstring(i18n)Text for “Add” button
modalobject(i18n)Override modal labels {addLabel, editLabel}
autocompleteNames"search" | "search_only" | "off""search"Name autocomplete behavior
roleOptionsarray(from config)Options for role dropdown

Role options are typically loaded from form config at vocabularies.contributor-types.

IdentifiersField

Array of identifier type-value pairs with validation:

import { IdentifiersField, personIdentifiersSchema, objectIdentifiersSchema, organizationIdentifiersSchema, } from "@js/oarepo_ui/forms"; <IdentifiersField fieldPath="metadata.identifiers" options={personIdentifiersSchema} />

Source: oarepo-ui/forms/components/IdentifiersField 

Based on: react-invenio-forms.ArrayField, react-invenio-forms.SelectField, react-invenio-forms.TextField

Props:

PropTypeDefaultDescription
fieldPathstring(required)Path to identifiers array
optionsarray(required)Choices for scheme dropdown
labelIconstring"pencil"Icon beside field label
classNamestring""Additional CSS class
defaultNewValueobject{scheme:"", identifier:""}Template for new entry
validateOnBlurbooleanfalseRun validation on blur

Predefined option schemas:

  • personIdentifiersSchema - ORCID, ScopusID, ResearcherID, ISNI, etc.
  • organizationIdentifiersSchema - ISNI, ROR, ICO, DOI
  • objectIdentifiersSchema - DOI, Handle, ISBN, ISSN, RIV

File Upload Components

InvenioRDM provides two file upload UI options:

UIWhen Used
FileUploaderAPP_RDM_DEPOSIT_NG_FILES_UI_ENABLED = False
UppyUploaderAPP_RDM_DEPOSIT_NG_FILES_UI_ENABLED = True (enable in invenio.cfg)

Note: The nrp-model-copier template uses UppyUploader by default in FormFieldsContainer.jsx. To use the standard uploader used by InvenioRDM, import FileUploader instead.

CSP Configuration: When using Uppy, add to your application configuration (invenio.cfg):

invenio.cfg
APP_DEFAULT_SECURE_HEADERS = { # ... "script-src": ["'self'", "blob:", "'wasm-unsafe-eval'"], # ... }

FileUploader (InvenioRDM default)

Simple, robust file picker and drag-and-drop UI with file list and progress indicators:

import { FileUploader } from "@js/invenio_rdm_records"; <FileUploader config={formConfig} files={files} isDraftRecord={!record.is_published} hasParentRecord={record?.versions?.index > 1} quota={formConfig.quota} permissions={permissions} record={record} uploadFiles={handleUpload} deleteFile={handleDelete} importParentFiles={handleImport} decimalSizeDisplay={formConfig.decimal_size_display} filesLocked={filesLocked} allowEmptyFiles={formConfig.allow_empty_files} fileModification={fileModification} />

Source: invenio-rdm-records/fields/FileUploader 

Props:

PropTypeRequiredDescription
configobjectnoUI configuration or overrides
dragTextstring(i18n)Text shown in drop-zone when dragging files
filesobjectnoMap of file identifiers → file metadata
isDraftRecordbooleanyestrue when editing a draft
hasParentRecordbooleanyesWhether previous version exists (for import)
quotaobjectyes{maxStorage, maxFiles} limits
recordobjectnoFull record object
uploadButtonIconstring"upload"Icon for upload button
uploadButtonTextstring(i18n)Upload button label
importButtonIconstring"sync"Icon for import button
importButtonTextstring(i18n)Import button label
isFileImportInProgressbooleannoLoading state during import
importParentFilesfuncyesCallback to import files from parent
uploadFilesfuncyesCallback to upload files: (draft, files[]) => void
deleteFilefuncyesCallback to delete a file
decimalSizeDisplaybooleanyesShow file sizes with decimal units
filesLockedbooleanyesDisable drop-zone (after publish)
permissionsobjectnoPermission flags (can_new_version, etc.)
allowEmptyFilesbooleanyesAllow zero-byte files
fileModificationobjectnoFile modification settings for published records

Features:

  • Drag-and-drop or file picker
  • File list with size and delete option
  • Progress indicators for uploads
  • Import files from previous version
  • Warning for duplicate/empty files
  • Quota enforcement (max files, max storage)

UppyUploader (Experimental)

Modern UI with folder upload, chunked upload, media preview, extensible plugins:

import { UppyUploader } from "@js/invenio_rdm_records"; <UppyUploader isDraftRecord={!record.is_published} config={formConfig} quota={formConfig.quota} decimalSizeDisplay={formConfig.decimal_size_display} allowEmptyFiles={formConfig.allow_empty_files} fileUploadConcurrency={formConfig.file_upload_concurrency} showMetadataOnlyToggle={false} filesLocked={filesLocked} />

Source: invenio-rdm-records/fields/UppyUploader 

Documentation: File Uploads - Uploader 

Based on: Uppy.js library

Props:

PropTypeRequiredDescription
isDraftRecordbooleanyesWhether current record is a draft (allows uploads)
configobjectyesForm configuration object from deposit form
quotaobjectyesUpload quota limits and remaining space
decimalSizeDisplayboolean(from config)Show file sizes with decimal or whole numbers
allowEmptyFilesboolean(from config)Allow uploading empty files
fileUploadConcurrencynumber(from config)Number of concurrent file uploads
showMetadataOnlyTogglebooleanfalseShow metadata-only file toggle
filesLockedbooleanyesWhether file uploads are disabled (published records)

Features:

  • Drag-and-drop or picker for files/folders
  • Folder upload (entire directories at once)
  • Chunked/multipart upload for large files
  • Automatic retry on upload failure
  • Per-part checksum validation
  • Image previews and basic editing (crop, rotate, resize)
  • Plugin system for extensions (validation, metadata, external sources)
  • Mobile-responsive with keyboard navigation and screen-reader support |

AccessRightField

Record access and file permissions configuration:

import { AccessRightField } from "@js/oarepo_ui/forms"; <AccessRightField fieldPath="access" label="Access rights" labelIcon="unlock" record={record} recordRestrictionGracePeriod={180} allowRecordRestriction={true} />

Source: oarepo-ui/forms/components/AccessRightField 

Based on: invenio-rdm-records.AccessRightFieldCmp

Props:

PropTypeRequiredDescription
fieldPathstringyesPath to access-right field
labelstringyesDisplay label
labelIconstringyesSemantic UI icon name
showMetadataAccessboolnoShow metadata access option (true)
communityobjectnoSpecific community object
recordobjectyesCurrent record object
recordRestrictionGracePeriodnumberyesGrace period in days
allowRecordRestrictionboolyesEnable record restriction UI

ArrayFieldItem

Helper component for rendering array items with remove button:

import { ArrayFieldItem } from "@js/oarepo_ui/forms"; <ArrayFieldItem indexPath={index} arrayHelpers={arrayHelpers} fieldPathPrefix={`${fieldPath}.${index}`} > {/* Subfields */} </ArrayFieldItem>

Source: oarepo-ui/forms/components/ArrayFieldItem 

Based on: react-invenio-forms.GroupField

Props:

PropTypeRequiredDescription
arrayHelpersobjectyesFormik FieldArray helpers
indexPathnumberyesIndex of this item in array
fieldPathPrefixstringyesPrefix for button IDs
childrennodenoJSX to render inside
classNamestring"invenio-group-field"CSS class for GroupField
removeButtonfuncnoCustom remove button component
removeButtonPropsobjectnoProps for custom remove button
displayFirstInputRemoveButtonbooleantrueShow remove on first element
removeButtonLabelClassNamestring""Additional class for label

Controlled Vocabulary Components

Components from oarepo-vocabularies for vocabulary term forms:

VocabularyField

Smart wrapper that automatically selects between local or API-loaded vocabulary selector based on form configuration:

import { VocabularyField } from "@js/oarepo_vocabularies_ui/form"; <VocabularyField fieldPath="props.resource_type" vocabularyName="resource_type" />

Source: oarepo-vocabularies/VocabularyField 

Based on: LocalVocabularySelectField or VocabularySelectField (auto-selected)

Props:

PropTypeRequiredDescription
fieldPathstringyesPath to field in Formik values
vocabularyNamestringyesVocabulary identifier

VocabularySelectField

API-loaded vocabulary selector for large vocabularies with pagination and remote search:

import { VocabularySelectField } from "@js/oarepo_vocabularies_ui/form"; <VocabularySelectField vocabularyName="languages" fieldPath="props.language" multiple={false} showLeafsOnly={false} />

Source: oarepo-vocabularies/VocabularySelectField 

Based on: react-invenio-forms.RemoteSelectField

Props:

PropTypeRequiredDescription
vocabularyNamestringyesVocabulary identifier (/api/vocabularies/<name>)
fieldPathstringyesPath in Formik state
externalAuthoritybooleannoWhether from external authority
multiplebooleannoEnable multiple selections
filterFunctionfuncnoFilter/transform each suggestion
showLeafsOnlybooleannoShow only leaf nodes (hierarchies)
suggestionAPIHeadersobjectno (Accept header)HTTP headers for API

LocalVocabularySelectField

Local vocabulary selector for small vocabularies loaded entirely at once:

import { LocalVocabularySelectField } from "@js/oarepo_vocabularies_ui/form"; <LocalVocabularySelectField vocabularyName="resource_type" fieldPath="props.resource_type" usedOptions={[]} showLeafsOnly={false} />

Source: oarepo-vocabularies/LocalVocabularySelectField 

Based on: react-invenio-forms.SelectField

Props:

PropTypeRequiredDescription
fieldPathstringyesPath in Formik values
vocabularyNamestringyesKey to look up options in formConfig.vocabularies
usedOptionsarraynoValues to keep selectable even if used elsewhere
multiplebooleannoForce multi-select mode
optimizedbooleanyesUse optimized select with debounced search
showLeafsOnlybooleannoShow only leaf nodes

VocabularyPickerField

Flexible picker field for displaying selected vocabulary values with custom selection UI:

import { VocabularyPickerField } from "@js/oarepo_vocabularies_ui/form"; <VocabularyPickerField fieldPath="props.subjects" multiple={true} label="Subjects" initialValue={[]} > <YourVocabularySelector /> </VocabularyPickerField>

Source: oarepo-vocabularies/VocabularyPickerField 

Based on: Formik context, FieldValueProvider

Props:

PropTypeRequiredDescription
fieldPathstringyesPath in Formik values
labelstring | nodenoField label
multiplebooleannoEnable multiple selections
requiredbooleannoMark as required
initialValuearray | objectnoStarting value
onChangefuncnoCallback with new value (multi-select only)
childrennodenoChild selector UI components

VocabularyMultilingualInputField

Multilingual text input for vocabulary titles/names:

import { VocabularyMultilingualInputField } from "@js/oarepo_vocabularies_ui/form"; <VocabularyMultilingualInputField fieldPath="title" label="Title" required={true} textFieldLabel="Name" />

Source: oarepo-vocabularies/VocabularyMultilingualInputField 

Based on: react-invenio-forms.ArrayField, LanguageSelectField

Props:

PropTypeRequiredDescription
fieldPathstringyesPath to multilingual field
labelstringno (i18n: “Title”)Component label
requiredbooleannoMark as required
textFieldLabelstringno (i18n: “Name”)Label for inner name field
displayFirstInputRemoveButtonbooleannoShow remove on first item

PropFieldsComponent

Renders custom vocabulary field props as text inputs:

import { PropFieldsComponent } from "@js/oarepo_vocabularies_ui/form"; <PropFieldsComponent vocabularyProps={vocabularyProps} />

Source: oarepo-vocabularies/PropFieldsComponent 

Based on: react-invenio-forms.TextField

Props:

PropTypeRequiredDescription
vocabularyPropsobjectyesVocabulary configuration object

Base Components (from react-invenio-forms)

These components are used by oarepo-ui but imported directly from react-invenio-forms:

ArrayField

Dynamic array wrapper with add button:

import { ArrayField } from "react-invenio-forms"; <ArrayField fieldPath={fieldPath} addButtonLabel="Add item" defaultNewValue={{ name: "" }} > {({ arrayHelpers, indexPath }) => ( <div>...</div> )} </ArrayField>

Source: react-invenio-forms 

GroupField

Form field grouping component:

import { GroupField } from "react-invenio-forms"; <GroupField fieldPath="metadata.name"> <TextField fieldPath="metadata.name.given" /> <TextField fieldPath="metadata.name.family" /> </GroupField>

Source: react-invenio-forms 

AccordionField

Collapsible section container:

import { AccordionField } from "react-invenio-forms"; import { i18next } from "@translations/i18next"; <AccordionField includesPaths={["metadata.title", "metadata.description"]} active label={i18next.t("Basic information")} > <TextField fieldPath="metadata.title" /> <TextField fieldPath="metadata.description" /> </AccordionField>

Source: react-invenio-forms 

Props:

PropTypeDefaultDescription
includesPathsarray(required)Field paths triggering accordion expansion
activebooleanfalseWhether section is expanded by default
labelstring/node(required)Section label

RichInputField

Rich text editor wrapper:

import { RichInputField } from "react-invenio-forms"; <RichInputField fieldPath="metadata.description" label="Description" editor={<OarepoRichEditor />} />

Source: react-invenio-forms 

Note: This component requires explicit field metadata props (label, helpText) unlike oarepo-ui components.

Further Reading

Last updated on