InputComponentProps
Defined in: packages/core/src/fields/types.ts:106
Props passed to field input components rendered in the document edit form.
Every input component registered in a framework adapter’s fields map must
accept these props. The TField generic narrows fieldDef to the specific
field type (e.g. TextField) so type-specific properties are accessible
with autocomplete.
In React, use createFieldInput<TValue, TField> to build components that
accept these props — it handles TanStack Form wiring automatically.
Example
Section titled “Example”// React — using createFieldInputexport const TextFieldInput = createFieldInput<string, TextField>( ({ name, fieldDef, readOnly, field }) => ( <input value={field.state.value ?? ""} onChange={(e) => field.handleChange(e.target.value)} readOnly={readOnly} placeholder={fieldDef.admin.placeholder} /> ),);- CellComponentProps for the data table equivalent
- FieldComponentMap for how components are registered
Type Parameters
Section titled “Type Parameters”TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends BaseFieldMeta = BaseFieldMeta
TField
Section titled “TField”TField extends AdminField<TFieldMeta> = AdminField<TFieldMeta>
Properties
Section titled “Properties”collection
Section titled “collection”collection:
CollectionConfig<{ }, { },string,string,ComponentHKT> |GlobalConfig<{ }, { },string,string,ComponentHKT>
Defined in: packages/core/src/fields/types.ts:118
The config for the collection this field is attached to.
fieldDef
Section titled “fieldDef”fieldDef:
TField
Defined in: packages/core/src/fields/types.ts:113
The resolved field definition — narrows to the specific field type via TField.
index?
Section titled “index?”
optionalindex?:number
Defined in: packages/core/src/fields/types.ts:116
name:
string
Defined in: packages/core/src/fields/types.ts:111
The field key name from the collection config, e.g. "title". Used as the form field name.
readOnly
Section titled “readOnly”readOnly:
boolean
Defined in: packages/core/src/fields/types.ts:115
Whether the field is non-editable — derived from fieldDef.admin.readOnly or permission checks.