NeuTextarea wraps a native multiline textarea with a public value model. Rows, resize policy, label, hint and error presentation are component inputs; form validation remains external.
These values match the current preview. Complete handlers, Core imports and templates are in Source.
configured-state.ts
import { signal } from '@angular/core';
export const text = signal("");
These inputs require a model or function, not a checkbox. Edit the same-named field in the Source component and bind it in the template; data already used by this preview appears in the state above.
autoResize grows to content; resizable controls manual vertical resizing when autoResize is off. Disabled blocks focus and edits; readonly remains focusable while blocking edits. The demo uses real inputs outside FormField.
Define validation in your form schema and supply errorMessage for visible feedback. Core reflects invalid state and associates the feedback with the field.
pattern carries FormValueControl validation metadata. A native textarea does not perform HTML pattern validation: use a form-schema pattern rule or your application's validator; setting this input alone does not validate the text.
Bind [(value)] to the application's text signal. Listen to touch only if you need to react to blur. Reset the application value or form field to change the text.
Core connects the label, hint and error message to the native textarea and reflects form state. Enter inserts a line break; readonly fields remain focusable.
Your application supplies a useful label, validation rules and actionable error text. Do not use placeholder as the only label.
value holds the editable text; touch reports blur. Presentation and form-state inputs are listed separately from these editing and notification contracts.
Inputs
Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.
Name
Type
Default
Template binding
Description
ariaDescribedBy
string
''
[ariaDescribedBy]
IDs of elements describing the native textarea, separated by spaces. Use this for help or validation messages.
ariaLabel
string
''
[ariaLabel]
Accessible name for the native textarea when its visible label is not sufficient.
ariaLabelledBy
string
''
[ariaLabelledBy]
IDs of elements naming the native textarea, separated by spaces.
autoResize
boolean
false
[autoResize]
Grows the textarea to its content and disables manual resize.
dirty
boolean
false
[dirty]
Applied dirty state, normally supplied by FormField.
disabled
boolean
false
[disabled]
Disables the native textarea and removes it from focus.
errorMessage
string
''
[errorMessage]
Explicit visible error text when error state is present.
errors
readonly ValidationError.WithOptionalFieldTree[]
[]
[errors]
Applied validation errors, normally from the form schema.
hidden
boolean
false
[hidden]
Hides the component host.
hint
string
''
[hint]
Help text linked to the native textarea until a visible error replaces it.
ID shared by the native textarea and its label/help references.
invalid
boolean
false
[invalid]
Applied invalid flag; it does not validate text itself.
label
string
''
[label]
Visible label associated with the native textarea.
maxLength
number | undefined
undefined
[maxLength]
Native maximum text length.
minLength
number | undefined
undefined
[minLength]
Native minimum text length; schema validation is separate.
name
string
''
[name]
Native form-control name.
pattern
readonly RegExp[]
[]
[pattern]
FormValueControl pattern metadata. Define validation in the form schema; a native textarea does not validate HTML pattern.
pending
boolean
false
[pending]
Applied pending state announced through aria-busy.
readonly
boolean
false
[readonly]
Keeps the native textarea focusable while blocking edits.
required
boolean
false
[required]
Marks the native textarea required; schema validity comes from the form.
resizable
boolean
true
[resizable]
Allows manual horizontal and vertical resize within the container when autoResize is off.
rows
number
3
[rows]
Initial native row count.
size
"sm" | "md" | "lg"
'md'
[size]
Small, medium or large control size.
touched
boolean
false
[touched]
Applied touched state, normally supplied by FormField.
Models
A model supports [(property)]="signal" or the [property] and (propertyChange) pair. Choose one form, not both.
Name
Type
Default
Template binding
Description
value
string
''
[(value)]
Bidirectional multiline text model owned by the application or FormField.
Outputs
Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.
Name
Payload
Template binding
Description
touch
void
(touch)="onTouch($event)"
Lifecycle notification emitted when the textarea blurs.
Templates
ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.
This component does not expose content projection or public customization templates.