Skip to content

TextField

Defined in: packages/core/src/fields/text/types.ts:104

Resolved configuration for a text() field, after all defaults are applied.

This is the type that framework adapters and field components receive — fieldDef in InputComponentProps<TextField> and CellComponentProps<TextField> is this type.

  • TextFieldInput for the user-facing input type
  • text for the config function that produces this type

TFieldMeta extends object = { }

admin: FieldAdminConfig

Defined in: packages/core/src/fields/text/types.ts:111

Resolved admin UI configuration with all defaults applied.

BaseField.admin


defaultValue: string

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

Pre-filled value shown in the admin form when creating a new field.

BaseField.defaultValue


optional description?: string

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

Semantic description of the field. Used in three places:

  1. Helper text rendered below the field input in the admin form UI.
  2. As the Zod .meta({ description }) value for form validation.
  3. As the JSDoc comment on the generated document interface property.

To write a separate JSDoc comment, use interfaceDescription in addition.

BaseField.description


optional index?: string

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

Convex index name for this field.

BaseField.index


optional interfaceDescription?: string

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

The JSDoc comment on the generated document interface property

BaseField.interfaceDescription


interfaceType: string

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

TypeScript type string written to generated document interfaces (e.g. "string", "number", "string[]").

BaseField.interfaceType


label: string

Defined in: packages/core/src/fields/text/types.ts:107

Display label shown in the admin form. Always set — inferred from the field key if not provided.

BaseField.label


optional max?: object

Defined in: packages/core/src/fields/text/types.ts:122

Maximum allowed character length config.

optional error?: string

Maximum allowed character length error message.

value: number

Maximum allowed character length value.


meta: TFieldMeta

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

BaseField.meta


optional min?: object

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

Minimum allowed character length config.

optional error?: string

Minimum allowed character length error message.

value: number

Minimum allowed character length value.


required: boolean

Defined in: packages/core/src/fields/text/types.ts:109

Whether this field is required in the database schema.

BaseField.required


optional searchIndex?: object

Defined in: packages/core/src/fields/text/types.ts:129

Full-text search index configuration for this field.

filterFields: string[]

Fields to filter search results by.

name: string

Search index name — must be unique within the collection.


readonly type: "text"

Defined in: packages/core/src/fields/text/types.ts:105