Skip to main content

upp-textarea

A multi-line text input component that integrates with Angular Reactive Forms. It supports configurable row count, kiosk mode, floating labels, and inline validation error display -- mirroring the same patterns as upp-input but for multi-line content.

When to Use

Use upp-textarea for any field where the user needs to enter longer text such as descriptions, notes, or comments. It provides the same form integration, error display, and kiosk support as upp-input, but renders a <textarea> element with a configurable number of rows.

Demo

Source Code

<h2>Product Description</h2>
<p class="demo-description">Edit a product's text content using <code>upp-textarea</code> with validation and character counting.</p>

<div class="demo-controls">
<ion-button size="small" (click)="toggleReadonly()">Readonly: {{ isReadonly }}</ion-button>
<ion-button size="small" color="warning" (click)="validate()">Validate</ion-button>
<ion-button size="small" color="medium" (click)="resetForm()">Reset</ion-button>
</div>

<div class="demo-section" [formGroup]="form">
<h3>Product Copy</h3>

<div class="demo-field">
<label class="demo-label">Short Description (required) &mdash; {{ shortDescriptionLength }} chars</label>
<upp-textarea
formControlName="shortDescription"
placeholder="A brief summary of the product..."
title="Short Description"
[rows]="2"
[readonly]="isReadonly"
[kiosk]="false"
[errornfo]="errorMessages">
</upp-textarea>
</div>

<div class="demo-field">
<label class="demo-label">Detailed Notes (optional) &mdash; {{ detailedNotesLength }} chars</label>
<upp-textarea
formControlName="detailedNotes"
placeholder="Ingredients, allergens, storage instructions..."
title="Detailed Notes"
[rows]="5"
[readonly]="isReadonly"
[kiosk]="false">
</upp-textarea>
</div>
</div>

API Reference

UppTextAreaComponent (upp-textarea)

The main textarea component. Wraps upp-kb-textarea (keyboard-level textarea) and upp-er-textarea (inline error display) into a single, form-ready widget.

Inputs

PropertyTypeDefaultDescription
placeholderstring''Placeholder text shown when the field is empty.
formControlNamestring''Name of the reactive form control this textarea binds to.
readonlybooleanfalseWhen true, the textarea is read-only.
disabledbooleanfalseWhen true, the textarea is disabled. Also respects the parent FormGroup disabled state.
kioskbooleantrueEnables kiosk mode (on-screen keyboard) when the platform reports kiosk.
rowsnumber1Number of visible text rows.
titlestring''Floating label text displayed above the textarea when it has a value. Falls back to placeholder if empty.
autocompletestring'off'HTML autocomplete attribute value.
errornfoRecord<string, string>{}Map of validation error keys to human-readable messages.
valuestring | nullnullThe current value (two-way via ControlValueAccessor).

Outputs

EventPayloadDescription
Changedstring | nullEmitted when the value changes.
FocusvoidEmitted when the textarea gains focus.