Skip to content

UIFieldAdminInput

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

The subset of FieldAdminConfigInput meaningful for a kind: "ui" field — no stored value, so no placeholder/cellAlignment. collapsible() and ui() extend it with their own extra options; row() and tabs() use it as-is.

  • Pick<FieldAdminConfigInput<TCollectionSlug>, "condition" | "hidden" | "readOnly" | "position" | "width">

TCollectionSlug extends VexResourceSlug = VexResourceSlug

optional condition?: (props) => boolean

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

Shows the field only while this returns true; a hidden field also skips required and validate(). A condition that throws counts as met.

Declared with method syntax so the parameter is checked bivariantly: a field authored for one collection stays assignable to the generic field unions the admin views hold. To author a condition separately, type it as FieldCondition.

FieldConditionProps<TCollectionSlug>

boolean

Pick.condition


optional hidden?: boolean

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

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

Default: false

FieldAdminConfigInput.hidden


optional position?: "main" | "sidebar"

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

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

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

Default: false

FieldAdminConfigInput.readOnly


optional width?: string

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

Width of the field within its row, as any CSS width ("50%", "240px"). A row() lays its children out with flex-wrap, sharing a line when their widths allow; below the sm breakpoint every field is full width.

Default: "100%"

FieldAdminConfigInput.width