Component v1.1.0 Forms

Textarea

Multi-line text field with label, helper/error text, resize options, and Angular forms support.

API Stable 2.1 WCAG notes Ready Dark mode
Selector
ui-textarea
Package
@ngnova/ui/textarea

Import

Standalone Tailwind v4
import { UiTextareaComponent } from '@ngnova/ui/textarea';

Usage & variants

Live examples use the public ui-textarea API, paired with the exact snippet a product team would paste into an Angular app.

API Reference

Release notes editor

Multi-line text field with label, helper/error text, resize options, and Angular forms support.

Counter, resize, and validation-ready field state.

38 / 280

Production guidance

Use these notes to decide when the component belongs in a product workflow and what to verify before shipping.

When to use

Use for comments, notes, descriptions, issue summaries, release notes, and review feedback.

Watch for

Use resize="none" only when layout requires fixed height.

Product recipes

Apply Textarea in distinct, copyable product scenarios—not just an isolated component state.

Release notes

Pair maxLength with the built-in counter.

Angular template ui-textarea-recipe.example.html
1
2
3
4
5
6
7
8
<ui-textarea
  label="Release notes"
  placeholder="Describe what changed..."
  helperText="Keep release notes concise and user-facing."
  [maxLength]="280"
  [rows]="5"
  [formControl]="releaseNotes"
/>

Validation state

Use fixed resize and clear error text for required review notes.

Angular template ui-textarea-recipe.example.html
1
2
3
4
5
6
7
<ui-textarea
  label="Review notes"
  errorText="Notes are required before publishing."
  resize="none"
  required
  [rows]="4"
/>

API Reference

Inputs and outputs are semver-sensitive public API. Keep examples aligned with this table.

Inputs

label ''
string

Visible field label.

placeholder ''
string

Native textarea placeholder.

helperText ''
string

Support text shown below the field.

errorText ''
string

Error text shown below the field and reflected in aria-invalid.

size 'md'
'sm' | 'md' | 'lg'

Textarea padding and text scale.

resize 'vertical'
'none' | 'vertical' | 'horizontal' | 'both'

Native resize affordance.

appearance 'outline'
'outline' | 'filled'

Visual field treatment for standard or denser form surfaces.

inputId generated
string

ID applied to the native textarea.

name ''
string

Native textarea name.

ariaLabel ''
string

Accessible label when no visible label is provided.

validationMessages {}
Record<string, string>

Custom validation messages keyed by Angular validation error name.

rows 4
number

Native rows attribute.

maxLength null
number | null

Native maxlength constraint.

minLength null
number | null

Native minlength constraint.

disabled false
boolean

Disables the native textarea.

readonly false
boolean

Makes the native textarea read-only.

required false
boolean

Marks the native textarea as required.

hideCounter false
boolean

Hides the character counter when maxLength is set.

Outputs

valueChange OutputEmitterRef<string>

Emits the current value on input.

focused OutputEmitterRef<FocusEvent>

Emits when the textarea receives focus. The host also forwards a native focus event.

blurred OutputEmitterRef<FocusEvent>

Emits when the textarea loses focus. The host also forwards a native blur event.

Accessibility

  • Labels use the native textarea id, and helper, error, and counter text are included in aria-describedby.
  • Invalid states set aria-invalid and announce visible error text with role="alert".

Keyboard behavior

  • Uses native textarea behavior including multiline typing, Tab focus, and Shift+Tab navigation.

Testing guidance

  • Assert CVA behavior, counter text, validation messages, and aria-describedby.