Skip to content

RelationshipFieldAdminInput

Defined in: packages/core/src/fields/relationship/types.ts:24

Admin configuration input specific to a relationship field instance.

Extends FieldAdminConfigInput with a components slot that lets a single field override the preview renderer — taking precedence over the target collection’s admin.components.preview.

TCollectionSlug extends CollectionSlug = CollectionSlug

The target collection slug, inferred from the field’s collection option.

TComponent extends ComponentHKT = ComponentHKT

optional cellAlignment?: Alignment

Defined in: packages/core/src/fields/baseTypes.ts:137

Content alignment in data table cells. ‘left’ | ‘right’ | ‘center’

FieldAdminConfigInput.cellAlignment


optional components?: object

Defined in: packages/core/src/fields/relationship/types.ts:32

Custom component overrides specific to this relationship field instance. These take precedence over the target collection’s admin.components.

optional preview?: ApplyComponent<TComponent, RelationshipPreviewProps<TCollectionSlug>>

Per-field override for rendering this relationship’s docs. Wins over the target collection’s admin.components.preview. TCollectionSlug is the target slug (fieldDef.collection.slug).


optional hidden?: boolean

Defined in: packages/core/src/fields/baseTypes.ts:104

Hide this field from the admin form. Hidden fields are still stored in the database.

Default: false

FieldAdminConfigInput.hidden


optional placeholder?: string

Defined in: packages/core/src/fields/baseTypes.ts:133

Placeholder text shown in the input when empty.

FieldAdminConfigInput.placeholder


optional position?: "main" | "sidebar"

Defined in: packages/core/src/fields/baseTypes.ts:120

Position of the field in the form layout.

  • "main" — placed in the main content area
  • "sidebar" — placed in the sidebar panel

Default: "main"

FieldAdminConfigInput.position


optional readOnly?: boolean

Defined in: packages/core/src/fields/baseTypes.ts:111

Make this field read-only in the admin form. The value is displayed but cannot be edited.

Default: false

FieldAdminConfigInput.readOnly


optional width?: "full" | "half"

Defined in: packages/core/src/fields/baseTypes.ts:129

Width of the field within its row.

  • "full" — spans the full width
  • "half" — spans half the width (two fields per row)

Default: "full"

FieldAdminConfigInput.width