Textarea
A multi-line text input component with reactive form integration, validation support, and optional auto-expand functionality for capturing longer text content from users.
Import
import {FktTextareaComponent} from "frakton-ng/textarea";Basic usage
A basic textarea with label and placeholder. Use this as a starting point for most scenarios where free-form multi-line text input is needed.
Current value: (empty)
Current value: {{ control().value() || '(empty)' }}
Validation
Textarea with validation logic for minimum and maximum length. Shows error messages and disables submission if the requirements are not met.
Status:
{{ control().valid() ? 'Valid' : 'Invalid' }}
Character count:
{{ characterCount() }}/{{ maxLength() }}
Required minimum:
{{ minLength() }} characters
Auto expand
Textarea with auto-expand enabled. The textarea grows vertically as the user types more lines, improving the writing experience for long texts.
Auto-expand is enabled
The textarea will automatically grow as you type.
Try typing multiple lines to see the auto-expand behavior.
Lines count: 2
Auto-expand is {{ autoExpand() ? 'enabled' : 'disabled' }}
The textarea will {{ autoExpand() ? 'automatically grow' : 'maintain fixed height' }} as you type.
Try typing multiple lines to see the auto-expand behavior.
Lines count: {{ lineCount() }}
Form integration
Demonstrates how the textarea integrates with signal forms. This is ideal for real-world forms that need validation, control and submission.
Contact Form
Contact Form
@if (submittedData()) {
}
Character counter
Textarea with a live character counter, ideal for use cases like social posts, tweets, or messages with a maximum allowed length.
Character count:
{{ characterCount() }} / {{ maxLength() }}
Words: {{ wordCount() }}
Lines: {{ lineCount() }}
Remaining: {{ remainingCharacters() }}
@if (characterCount() > warningThreshold()) {
}
Disabled state
Shows the textarea in a disabled state. Useful for read-only or preview scenarios, or when editing is not allowed due to permissions or workflow status.
Status: {{ control().disabled() ? 'Disabled' : 'Enabled' }}