Skip to content

BlocksField

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

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

TCollectionSlug extends VexResourceSlug = VexResourceSlug

TFieldMeta extends object = { }

admin: BlocksFieldAdminConfig<TCollectionSlug>

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

Resolved admin UI configuration with all defaults applied.

BaseField.admin


blocks: BlockConfig<TFieldMeta>[]

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

Block type definitions allowed in this field.


defaultValue: Record<string, unknown>[]

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

Pre-filled value when creating a new document.

BaseField.defaultValue


optional description?: string

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

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?: ResolvedFieldIndexConfigInput

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

Convex index name for this field, or the object form for a compound index.

BaseField.index


optional interfaceDescription?: string

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

The JSDoc comment on the generated document interface property

BaseField.interfaceDescription


optional interfaceName?: string

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

Optional TypeScript union alias name.


interfaceType: string

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

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

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

Singular/plural display labels for the admin UI.

plural: string

singular: string


optional max?: FieldLimit

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

Maximum number of block items, with its resolved error message (Zod-enforced).

FieldLimit


meta: TFieldMeta

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

BaseField.meta


optional min?: FieldLimit

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

Minimum number of block items, with its resolved error message (Zod-enforced).

FieldLimit


required: boolean

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

Whether this field is required in the database schema.

BaseField.required


readonly type: "blocks"

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

optional validate(props): void | Promise<void>

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

Server-only async validation with value typed as GenericBlock[].

FieldValidateProps<TCollectionSlug, GenericBlock[]>

void | Promise<void>

FieldValidate

BaseField.validate