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 textareaExamples
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
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
Code Editor
Code input with monospace font and utilities
Code Editor
Write and format code
Language:
Lines: | Characters:
Email Template Composer
Professional template system with variable substitution
Email Template Composer
Create professional email templates with variables
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 |