For AI agents: the complete documentation index is available at https://a3s-lab.github.io/UI/en/llms.txt, the full documentation bundle is available at https://a3s-lab.github.io/UI/en/llms-full.txt, and this page is available as Markdown at https://a3s-lab.github.io/UI/en/components/textarea.md.

Textarea

Live previewHTML · CSS · JavaScript

Usage

Include CSS

Import Tailwind and one full A3S UI style bundle.

@import "tailwindcss";
@import "@a3s-lab/ui/a3s.css";

Or import only the base CSS, Textarea component CSS, and one style pack.

@import "tailwindcss";
@import "@a3s-lab/ui/base.css";
@import "@a3s-lab/ui/components/textarea.css";
@import "@a3s-lab/ui/styles/a3s.css";

Using CDN or bundler imports? See the Installation page.

Add your textarea HTML

Add class="textarea" to a <textarea> element. Textareas inside a class="field" container also receive the same styling automatically.

Use native HTML attributes for behavior: disabled for disabled textareas and aria-invalid="true" for invalid state styling.

<textarea class="textarea" aria-label="Message" placeholder="Type your message here"></textarea>

Textareas support right-to-left layouts through native browser direction handling.

Examples

Field

Use field with a label and description to create an accessible textarea.

Live previewHTML · CSS · JavaScript

Write a short message.

Disabled

Live previewHTML · CSS · JavaScript

Invalid

Live previewHTML · CSS · JavaScript

Message is required.

Button

Live previewHTML · CSS · JavaScript

Form

Live previewHTML · CSS · JavaScript

You can @mention other users and organizations.

RTL

Add dir="rtl" to the textarea, field, or an ancestor.

Live previewHTML · CSS · JavaScript

شاركنا أفكارك حول الخدمة.