Textarea

A multi-line text input field for longer content like comments, messages, and descriptions.

Installation

CLI

Install the component using the StarUI CLI:

star add textarea

Examples

Contextual Usage

Textarea sizes matched to specific use cases

Quick Note

Brief message or reminder

Perfect for short messages

Article Summary

Summarize the key points

Aim for 2-3 sentences

Essay Draft

Long-form writing space

Take your time to develop your ideas

Words: | Characters:

Character Counter

Track character count with visual feedback

Bio

Tell us about yourself

Max 280 characters

/ 280 characters

Comment Box with Live Preview

Rich text editor with real-time preview and formatting toolbar

Comment Box with Live Preview

Rich text editor with real-time preview

Live Preview

Auto-Expanding

Textarea that grows with content

Auto-Expanding

Grows with your content

This textarea expands as you type

Lines:

Feedback Form

Multi-field form with validation

Customer Feedback

Help us improve our service

Share your honest thoughts (10-1000 characters)

Feedback is required

Please provide at least 10 characters

Feedback cannot exceed 1000 characters

Rate your experience

Rating:

This helps us prioritize improvements

DraftReady to submitComplete

Code Editor

Code input with monospace font and utilities

Code Editor

Write and format code

Language:

Python

Lines: | Characters:

Email Template Composer

Professional template system with variable substitution

Email Template Composer

Create professional email templates with variables

Use {{variable}} syntax for dynamic content

Available variables: {{first_name}}, {{last_name}}, {{company_name}}, {{sender_name}}

Quick Variables:

Preview

Subject:

Variables will be replaced with actual values when sent

API Reference

Props

Prop Type Default Description
placeholder str | None None Placeholder text shown when empty
value str | None None Initial text value
signal str | None None Datastar signal for two-way binding
rows int | None None Number of visible text rows
maxlength int | None None Maximum number of characters
resize Literal['none','both','horizontal','vertical'] | None None Controls textarea resizing behavior
disabled bool False Whether the textarea is disabled
required bool False Whether the textarea is required
cls str '' Additional CSS classes