Textarea

The Textarea Field provides a multi‑line text input for longer content. It uses the Textarea component from shadcn/ui.

Installation

Included in Headcode CMS Starter, no setup needed.

Usage

hero.tsx
export const heroSection = {  name: 'hero',  label: 'Hero Section',  fields: {    subtitle: TextareaField({      label: 'Subtitle',    }),  },};

Options

hero.tsx
export const heroSection = {  name: 'hero',  label: 'Hero Section',  fields: {    subtitle: TextareaField({      label: 'Description',      defaultValue: 'Write something...',      validator: z.string().min(10),    });  },};