Ship faster with goilerplate templUI Pro

Textarea

Multi-line text field for longer form content.

Source Tailwind CSS JavaScript

Installation

templui add textarea

Load the script once in your layout:

<head>
  @textarea.Script()
</head>

Examples

Custom Rows

Auto Resize

With Label

Disabled

Form

Please type your message in the textarea.

This message is required.

API Reference

Required parameter
Hover for description

Textarea

Multi-line text field component for longer form content with auto-resize capability.

Name Type Default
ID

Unique identifier for the textarea element.

string
-
Class

Additional CSS classes to apply to the textarea.

string
-
Attributes

Additional HTML attributes to apply to the textarea element.

templ.Attributes
-
Name

Name attribute for form submission.

string
-
Placeholder

Placeholder text displayed when textarea is empty.

string
-
Value

Initial value of the textarea.

string
-
Rows

Number of visible text lines in the textarea.

int
3
Disabled

Whether the textarea is disabled and non-interactive.

bool
false
AutoResize

Whether the textarea should automatically resize based on content.

bool
false
ReadOnly

Whether the textarea is read-only.

bool
false
Axel Adrian