Textarea#

Multi-line text input component with model binding support.

Import#

TSX
import { Textarea, Col } from '@sigx/daisyui';

Basic Usage#

Use model for two-way binding:

TSX
Loading preview...

Sizes#

TSX
Loading preview...

Colors#

TSX
Loading preview...

Variants#

TSX
Loading preview...

Custom Rows#

Control the visible height with rows:

TSX
Loading preview...

With Character Counter#

TSX
Loading preview...

With FormField#

TSX
Loading preview...

Disabled State#

TSX
Loading preview...

Props#

PropTypeDefaultDescription
model() => signal.property-Model binding for two-way sync
namestring-Textarea name for form submission
placeholderstring-Placeholder text
rowsnumber3Number 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
disabledbooleanfalseDisable the textarea
autoCompletestring-Browser autocomplete hint ('off', 'on', etc.)
classstring-Additional CSS classes

Events#

EventTypeDescription
onInput(e: InputEvent) => voidFired on each keystroke (raw DOM event)
onChange(e: Event) => voidFired when focus leaves the textarea