Skip to content

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.

// React — using createFieldInput
export 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}
/>
),
);

TFieldMeta extends BaseFieldMeta = BaseFieldMeta

TField extends AdminField<TFieldMeta> = AdminField<TFieldMeta>

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: TField

Defined in: packages/core/src/fields/types.ts:113

The resolved field definition — narrows to the specific field type via TField.


optional index?: 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: boolean

Defined in: packages/core/src/fields/types.ts:115

Whether the field is non-editable — derived from fieldDef.admin.readOnly or permission checks.