textarea
textarea<
TCollectionSlug,TFieldKey,TFieldMeta>(options?):TextareaField<TCollectionSlug,TFieldMeta>
Defined in: packages/core/src/fields/textarea/config.ts:46
Creates a textarea field with all defaults applied.
Textarea fields store multi-line string values. Common uses: bios, descriptions, internal notes.
Accepts TextareaFieldInput (all optional) and returns TextareaField with all defaults applied.
Defaults applied:
label—""(inferred from the field key bydefineCollection)required—falserows—4admin.hidden—falseadmin.readOnly—falseadmin.position—"main"admin.width—"100%"admin.cellAlignment—"left"
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends string = string
TFieldKey
Section titled “TFieldKey”TFieldKey extends string = never
TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends BaseFieldMeta = BaseFieldMeta
Parameters
Section titled “Parameters”options?
Section titled “options?”TextareaFieldInput<TCollectionSlug, TFieldKey, TFieldMeta>
Textarea field configuration. All properties are optional.
Returns
Section titled “Returns”TextareaField<TCollectionSlug, TFieldMeta>
Resolved textarea field definition with all defaults applied.
Example
Section titled “Example”import { textarea, defineCollection } from '@vexcms/core'
authors: defineCollection({ fields: { // Minimal — label inferred from key ("Bio") bio: textarea(),
// Required, length-limited, taller textarea bio: textarea({ required: true, min: 10, max: 500, rows: 8 }), }})- TextareaFieldInput for the full input type
- TextareaField for the resolved output type