Skip to main content

Field components

Field components display individual record values in list, show and edit views. You rarely mount them by hand — SchemaField picks one from the field's type and format, and a FieldProvider can override that choice.

ComponentWhat it renders
SchemaFieldDispatcher — resolves type + format to one of the components below
TextFieldString values, with optional prefix/postfix and multiline wrapping
NumberFieldNumbers with locale, currency and unit formatting
DateFieldDates and datetimes in the active locale
TimeFieldA time of day, without a date
BooleanFieldA yes/no chip
ChoicesFieldAn enum value as a colored chip
ImageFieldA thumbnail that expands into a full-size dialog
PhoneNumberFieldA phone number in international format, with a country flag
SchemaRangeFieldA lower–upper pair, unbounded ends shown as ∞
SchemaObjectFieldNested object properties inside an object box
SchemaObjectArrayFieldAn array of objects inside an array box
ChipArrayFieldAn array of scalar values as chips
SchemaReferenceFieldA foreign key as a chip linking to the related record
SchemaReferenceArrayFieldAn array of foreign keys as a row of linking chips
RecordRepresentationChipThe chip those two render, on its own — plus SchemaRecordLink
CzechBankAccountFieldA Czech bank account formatted as prefix-account/bankCode; picked for format: "czech-bank-account"

Common props​

Every field component accepts these props (FieldProps); the per-component pages document only what they add on top.

NameTypeDefaultDescription
source (required)string—Name of the field on the record; dot notation reaches into nested objects
labelstring | ReactElement | falselabel from the schemafalse hides the label
textLabelstring—Plain-text label used where a node cannot be rendered (e.g. the export header)
shortLabelstring | ReactElement | false—Label used in narrow contexts such as datagrid columns
showLabelbooleandepends on the viewForces the label on or off
sortablebooleantrue when the schema says soWhether the list column can be sorted
sortBystringsourceField the backend sorts by when the column is clicked
recordRaRecordrecord from contextRenders a record other than the one in context
isRequiredbooleanfrom the schemaMarks the value as required in the layout
textAlign'left' | 'right' | 'center''left'Horizontal alignment
emptyTextstring—Text shown when the value is empty
fullWidthbooleanfalseStretches the field to the width of its container
sxSxProps<Theme>—MUI style override
transform(value: unknown) => any—Maps the raw value before it is displayed
caution

FieldProps carries no options key. The field components take explicit props (numberFormat, prefix, postfix, choices, iconsKey, …). For plain string/number fields it is FieldProvider's default implementation that reads the schema's options object and maps it onto those props directly; fields that need more than options — SchemaChoicesField, SchemaReferenceField — stay thin wrappers around the admin component. Each page's Schema options section states which key maps where.

See also​