Text Area Component

1. Overview

The TEXT_AREA component provides a multi-line text input field for longer text entries.

🛝 Use the Dynamic Form Playground to see the Text Area component in action and try out different configurations

2. Key Features

  • Multi-line text input for longer content
  • Auto-resize functionality for dynamic height
  • Character limit support with validation
  • Translation and string interpolation support
  • Ideal for comments, descriptions, addresses, and detailed input

3. Configuration Properties

Base Properties

PropertyTypeRequiredDescription
type'TEXT_AREA'YesSpecifies the field type as TEXT_AREA.
idstringYesUnique identifier for the field. The field's value is stored in the form state under this key.
renderNamestringNoOptional name added as data-render-name attribute to locate the rendered element in the DOM.
labelstringYesLabel text displayed above the field. Supports translation and string interpolation.
valuestringNoThe field's initial value. If set, the field will be pre-filled with this value.
placeholderstringNoPlaceholder text when empty. Supports translation and string interpolation.
hintstringNoAdditional hint text displayed below the field.
notestringNoInformational note displayed when there are no errors.
infoIconDfInfoIconConfigNoInfo icon with popover. Object with popoverText (string, required) and popoverDirection ('top', 'bottom', 'left', 'right').
validatorsarrayNoValidation rules for the field. Common types: REQUIRED, MIN_LENGTH, MAX_LENGTH, PATTERN. Each validator has type and optional errorMessage.
testIdstringNoTest identifier for automated testing. Set as data-testid attribute.
aclarrayNoAccess control rules for field visibility/editability. Each rule has state ('hidden', 'readonly', 'disabled', 'visible', 'editable') and optional condition (Filtrex expression).
columnSpannumberNoNumber of columns to span (1-12) in CUSTOM_COLUMN layout. Default: 12 (full width). See Overriding the number of grid columns when using --df-custom-columns.
spacingstringNoMargin spacing before next field: 'NONE' (0px), 'XS' (8px), 'S' (16px), 'M' (24px), 'L' (32px), 'XL' (40px), 'XXL' (48px).

Component Specific Properties

PropertyTypeRequiredDescription
autosizebooleanNoProperty that allow the component to auto-size when the are more written lines than rows.
layoutobjectNoThe layout of the field.
See also Layout Properties
maxLengthnumberNoThe maximum number of characters allowed in the <input> element.
optionalLabelstringNoText that is additionally displayed in the label if the field is not mandatory.
rowsnumberNoNumber of visible text lines for the control.

Layout Properties

PropertyTypeRequiredDescription
centerAlignInRetailbooleanNoControls the field alignment for "CUSTOM_COLUMN" layout in retail journeys. Set to true to center-align the field. Defaults to left alignment.
Ignored in expert journeys and other pre-defined layouts, which always use left alignment.

4. Configuration Examples

Basic Text Area

Example :
{
  "id": "comments",
  "type": "TEXT_AREA",
  "label": "Additional Comments",
  "rows": 4,
  "maxLength": 500
}

Required Text Area with Character Limit

Example :
{
  "id": "claimDescription",
  "type": "TEXT_AREA",
  "label": "Claim Description",
  "rows": 6,
  "maxLength": 1000,
  "validators": [
    {
      "type": "REQUIRED",
      "errorMessage": "Please provide a description"
    },
    {
      "type": "MIN_LENGTH",
      "minLength": 50,
      "errorMessage": "Description must be at least 50 characters"
    }
  ]
}

Text Area without Auto-sizing

Example :
{
  "id": "address",
  "type": "TEXT_AREA",
  "label": "Full Address",
  "rows": 3,
  "autosize": false,
  "hint": "Please enter your complete address"
}

5. API Reference

For complete API documentation, see DfTextAreaConfig.

For Aquila component documentation and design guidelines, see Input Field - Aquila Design System.

results matching ""

    No results matching ""