BaseFieldInput
Defined in: packages/core/src/fields/baseTypes.ts:183
Properties shared by all field types.
Every field type (text, number, checkbox, etc.) extends this interface
with its own type discriminant and type-specific options. These base
properties control labeling, validation, admin UI behavior, and database
indexing.
Defaults applied by field config functions:
{ label: "", // inferred from the field key by defineCollection required: false, // field is optional in the database schema admin: { ... } // see FieldAdminConfigInput for admin defaults}BaseField for the resolved type after defaults are applied
Extended by
Section titled “Extended by”TextFieldInputNumberFieldInputCheckboxFieldInputSelectFieldInputRelationshipFieldInputDateFieldInputUrlFieldInputColorFieldInputArrayFieldInputGroupFieldInputUploadFieldInput
Type Parameters
Section titled “Type Parameters”TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends object = { }
Properties
Section titled “Properties”admin?
Section titled “admin?”
optionaladmin?:FieldAdminConfigInput
Defined in: packages/core/src/fields/baseTypes.ts:209
Admin UI configuration for this field.
defaultValue?
Section titled “defaultValue?”
optionaldefaultValue?:unknown
Defined in: packages/core/src/fields/baseTypes.ts:207
Pre-filled value shown in the admin form when creating a new field. Does not apply to database values
description?
Section titled “description?”
optionaldescription?:string
Defined in: packages/core/src/fields/baseTypes.ts:194
Semantic description of the field. Used in three places:
- Helper text rendered below the field input in the admin form UI.
- As the Zod
.meta({ description })value for form validation. - As the JSDoc comment on the generated document interface property.
To write a separate JSDoc comment, use interfaceDescription in addition.
index?
Section titled “index?”
optionalindex?:string
Defined in: packages/core/src/fields/baseTypes.ts:220
Create a database index on this field. The string value becomes the index name in Convex.
Example
Section titled “Example”slug: { type: "text", index: "by_slug", required: true }// Generates: .index("by_slug", ["slug"])interfaceDescription?
Section titled “interfaceDescription?”
optionalinterfaceDescription?:string
Defined in: packages/core/src/fields/baseTypes.ts:196
The JSDoc comment on the generated document interface property
label?
Section titled “label?”
optionallabel?:string
Defined in: packages/core/src/fields/baseTypes.ts:185
Display label for the field in the admin form.
optionalmeta?:TFieldMeta
Defined in: packages/core/src/fields/baseTypes.ts:221
required?
Section titled “required?”
optionalrequired?:boolean
Defined in: packages/core/src/fields/baseTypes.ts:202
Whether this field is required.
Default: false