Documentation Index
Fetch the complete documentation index at: https://mintlify.com/filamentphp/filament/llms.txt
Use this file to discover all available pages before exploring further.
The textarea component allows you to interact with multi-line text.
Basic Usage
use Filament\Forms\Components\Textarea;
Textarea::make('description')
Available Methods
Sets the number of rows.Textarea::make('description')
->rows(10)
Sets the number of columns.Textarea::make('description')
->cols(20)
Makes textarea automatically resize.Textarea::make('description')
->autosize()
Makes the textarea read-only.Textarea::make('notes')
->readOnly()
Disables Grammarly.Textarea::make('code')
->disableGrammarly()
Trims whitespace from the textarea.Textarea::make('description')
->trim()
Sets minimum length validation.Textarea::make('description')
->minLength(10)
Sets maximum length validation.Textarea::make('description')
->maxLength(1000)
Sets exact length validation.Textarea::make('tweet')
->length(280)
Sets placeholder text.Textarea::make('description')
->placeholder('Enter a detailed description...')
Common Patterns
Product Description
Textarea::make('description')
->rows(5)
->maxLength(1000)
->required()
Auto-sizing Notes
Textarea::make('notes')
->autosize()
->placeholder('Add your notes here...')
Code Snippet
Textarea::make('code')
->rows(10)
->disableGrammarly()
->extraAttributes(['class' => 'font-mono'])
Textarea::make('comment')
->rows(4)
->minLength(10)
->maxLength(500)
->required()
Bio Field
Textarea::make('bio')
->autosize()
->maxLength(500)
->placeholder('Tell us about yourself...')