Textarea
Multi-line text input component with model binding support.
Import
import { Textarea, Col } from '@sigx/daisyui';
Basic Usage
Use model for two-way binding:
Loading preview...
Sizes
Loading preview...
Colors
Loading preview...
Variants
Loading preview...
Custom Rows
Control the visible height with rows:
Loading preview...
With Character Counter
Loading preview...
With FormField
Loading preview...
Disabled State
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
model | () => signal.property | - | Model binding for two-way sync |
name | string | - | Textarea name for form submission |
placeholder | string | - | Placeholder text |
rows | number | 3 | Number of visible text rows |
size | 'xs' | 'sm' | 'md' | 'lg' | 'md' | Textarea size |
variant | 'bordered' | 'ghost' | - | Visual variant |
color | 'primary' | 'secondary' | 'accent' | 'info' | 'success' | 'warning' | 'error' | - | Border color |
disabled | boolean | false | Disable the textarea |
autoComplete | string | - | Browser autocomplete hint ('off', 'on', etc.) |
class | string | - | Additional CSS classes |
Events
| Event | Type | Description |
|---|---|---|
onInput | (e: InputEvent) => void | Fired on each keystroke (raw DOM event) |
onChange | (e: Event) => void | Fired when focus leaves the textarea |