Skip to content

FieldAdminConfigInput

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

Configuration input for a field’s admin panel behavior.

Controls how the field appears and behaves in the admin UI — visibility, layout, input styling, and data table presentation. All properties are optional; unset properties fall back to the defaults listed below.

Defaults applied by field config functions (e.g., text(), number()):

{
hidden: false, // field is visible in the admin form
readOnly: false, // field is editable by default
position: "main", // placed in the main content column, not the sidebar
width: "full", // spans the full form width, not half
cellAlignment: "left", // text aligned left in data table cells
}
// Basic usage — all defaults applied
title: text({ admin: { width: "half" } })
// Sidebar metadata field
publishedAt: date({
description: "Scheduled publish time",
admin: { position: "sidebar" },
})
// Read-only computed field
createdAt: date({
required: true,
admin: { readOnly: true, hidden: false }
})
// Right-aligned number column in table
price: number({
admin: {
cellAlignment: "right",
placeholder: "0.00"
}
})

FieldAdminConfig for the resolved type after defaults are applied

optional cellAlignment?: Alignment

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

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


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


optional placeholder?: string

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

Placeholder text shown in the input when empty.


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"


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


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"