Skip to content

BlocksField

Defined in: packages/core/src/fields/blocks/types.ts:243

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

TFieldMeta extends object = { }

admin: FieldAdminConfig & object

Defined in: packages/core/src/fields/blocks/types.ts:247

Resolved admin UI configuration with all defaults applied.

defaultCollapsed: boolean

BaseField.admin


blocks: BlockConfig<TFieldMeta>[]

Defined in: packages/core/src/fields/blocks/types.ts:251

Block type definitions allowed in this field.


defaultValue: Record<string, unknown>[]

Defined in: packages/core/src/fields/blocks/types.ts:261

Pre-filled value when creating a new document.

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


optional interfaceName?: string

Defined in: packages/core/src/fields/blocks/types.ts:253

Optional TypeScript union alias name.


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/baseTypes.ts:234

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

BaseField.label


labels: object

Defined in: packages/core/src/fields/blocks/types.ts:259

Singular/plural display labels for the admin UI.

plural: string

singular: string


optional max?: number

Defined in: packages/core/src/fields/blocks/types.ts:257

Maximum number of block items (Zod-enforced).


meta: TFieldMeta

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

BaseField.meta


optional min?: number

Defined in: packages/core/src/fields/blocks/types.ts:255

Minimum number of block items (Zod-enforced).


required: boolean

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

Whether this field is required in the database schema.

BaseField.required


readonly type: "blocks"

Defined in: packages/core/src/fields/blocks/types.ts:246