Textarea

Form field for entering multi-line text.

---
import Textarea from "@forms/textarea/Textarea.astro";
---

<Textarea label="Message" name="message" placeholder="Enter your message here..." />
---
blocks:
  _component: building-blocks/forms/textarea
  label: Message
  name: message
  placeholder: Enter your message here...
---

Overview

A form field for entering multi-line text. Supports label, name, placeholder, default value, and required state. Ideal for comments, messages, or longer input fields.

Properties

label string | default: My textarea

The label text for the textarea field.

name string | default: my_textarea

A unique name attribute for the textarea field.

required boolean | default: false

Whether the field is required.

placeholder string

Placeholder text for the textarea field.

value string

The default value for the textarea field.

Examples

Required

---
import Textarea from "@forms/textarea/Textarea.astro";
---

<Textarea label="Comments" name="comments" placeholder="Please provide your comments..." required />
---
blocks:
  _component: building-blocks/forms/textarea
  label: Comments
  name: comments
  placeholder: Please provide your comments...
  required: true
---