Installation
Usage
Examples
Basic
A simple textarea with a placeholder.With Button
Combine textarea with a button for form submissions.Disabled
Use thedisabled prop to disable user interaction.
Form Integration
Component Code
Props
The Textarea component accepts all standard HTML textarea attributes:| Prop | Type | Description |
|---|---|---|
className | string | Additional CSS classes to apply |
placeholder | string | Placeholder text |
disabled | boolean | Disables the textarea |
value | string | Controlled value |
onChange | (e: React.ChangeEvent<HTMLTextAreaElement>) => void | Change handler |
rows | number | Number of visible text lines |
maxLength | number | Maximum number of characters |
aria-invalid | boolean | Marks textarea as invalid for validation |
Features
- Auto-resizing with
field-sizing-content - Focus ring with smooth transitions
- Dark mode support
- Accessible with ARIA attributes
- Invalid state styling
- Disabled state styling