---
title: "pdx-material-textarea JSON API (Canonical)"
slug: "pdx-material-textarea-json-api"
doc_type: "api-reference"
component: "pdx-material-textarea"
document_kind: "json-api-canonical"
reference_mode: "canonical"
contract_format: "json"
contract_source: "runtime-and-code"
description: "Referencia canonica do contrato JSON do componente pdx-material-textarea."
category: "components"
sub_category: "dynamic-fields"
audience:
  - "frontend"
  - "architect"
  - "platform-team"
level: "advanced"
status: "active"
owner: "praxis-ui"
source_of_truth:
  - "projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.metadata.ts"
  - "projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.ts"
  - "projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.html"
  - "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
  - "projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts"
source_of_truth_last_verified: "2026-03-06"
last_updated: "2026-03-06"
toc: true
sidebar: true
tags:
  - "json-api"
  - "canonical-contract"
  - "pdx-material-textarea"
api_stability: "canonical"
schema_verified: true
runtime_verified: true
editor_coverage_verified: false
runtime_scope: "public"
legacy_paths_present: false
has_known_mismatches: false
related_components:
  - "praxis-table"
  - "pdx-base-input-runtime-contract"
  - "pdx-text-input"
  - "pdx-year-input"
---

# pdx-material-textarea

Este documento e a referencia canonica da API JSON de pdx-material-textarea.

## Summary

- Tipo documental: API reference canonica de contrato JSON.
- Source of truth: runtime e codigo declarados no frontmatter.
- Objetivo operacional: consulta rapida, auditavel e deterministica sob pressao.
- Resumo funcional: Contrato JSON metadata-driven com comportamento definido por runtime e schema associado.

## Purpose and scope

- O componente consome payload JSON metadata-driven e expoe comportamento runtime configuravel por contrato.
- Esta referencia cobre contrato publico, classificacao de paths e semantica de cobertura (runtime/schema/editor).
- Fora de escopo: quickstart, tutorial narrativo e notas arquiteturais que nao alteram contrato publico.

## Consulta rapida (obrigatorio)

| Regra/tema | Observado | Canonico desejado | Status | Evidencia |
| --- | --- | --- | --- | --- |
| Component id | `pdx-material-textarea` | Manter ID canonico estavel e versionado por contrato | Active | frontmatter.component |
| Primary contract source | `runtime-and-code` | Runtime, schema e docs devem permanecer rastreaveis | Partial | frontmatter.contract_source + source_of_truth |
| Runtime coverage | `true` | Comportamentos runtime criticos devem ficar explicitamente verificados | Active | `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.ts` |
| Schema/type coverage | `true` | Tipos e schema devem refletir paths publicos do contrato | Active | source_of_truth + Detailed API reference |
| Editor/tooling coverage | `false` | Editor/tooling deve espelhar somente contrato publico suportado | Partial | `projects/praxis-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` |
| Legacy paths | `false` | Segregar legado de caminhos canonicos com janela de migracao | Active | frontmatter.legacy_paths_present |
| Known mismatches | `false` | Registrar observed vs desired de forma auditavel | Active | frontmatter.has_known_mismatches |

## Source of truth

| Source | Kind | Notes |
| --- | --- | --- |
| projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.metadata.ts | schema-metadata | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.html | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidencia de contrato. |
| projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |

## Support legend

- **Active**: suportado em runtime e liberado para uso externo.
- **Partial**: suporte parcial, com restricoes, lacunas ou validacao incompleta.
- **Declared-only**: declarado em tipos/schema sem evidencia operacional completa.
- **Schema-only**: presente em schema/tipos sem cobertura runtime confirmada.
- **Deprecated**: legado suportado por janela de migracao definida.

## Contract status snapshot

| Item | Value | Notes |
| --- | --- | --- |
| Reference mode | `canonical` | Deve permanecer canonico |
| Contract format | `json` | Contrato metadata-driven |
| Contract source | `runtime-and-code` | Alinhar com source_of_truth |
| Runtime scope | `public` | Escopo publicado para consumidores |
| Runtime verified | `true` | Revisar sempre com evidencia de runtime |
| Schema verified | `true` | Revisar sempre com evidencia de tipos/schema |
| Editor coverage verified | `false` | Revisar sempre com evidencia de editor/tooling |
| Legacy paths present | `false` | Segregar legado de contrato canonico |
| Has known mismatches | `false` | Divergencias devem aparecer em secao dedicada |

## Contract classification (obrigatorio)

### Canonical paths (public contract)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | n/a | Partial | See Detailed API reference for runtime semantics. |
| `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `visible` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.rows` | array | false | n/a | Partial | See Detailed API reference for runtime semantics. |
| `metadata.minRows` | array | false | n/a | Partial | See Detailed API reference for runtime semantics. |

### Supported legacy paths

Nenhum path legado suportado foi identificado nesta revisao.

### Internal-only paths

Nao ha paths internal-only confirmados no contrato publico desta revisao.

### Experimental paths

Nao ha paths experimentais confirmados no contrato publico desta revisao.

## Public contract surface (obrigatorio)

### Top-level configuration blocks

| Block | Purpose | Required | Merge strategy | Notes |
| --- | --- | --- | --- | --- |
| `metadata` | Payload declarativo principal do componente | true | deep-merge | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `readonlyMode` | Override de readonly no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `disabledMode` | Override de disabled no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `visible` | Override de visibilidade no host/runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `presentationMode` | Renderizacao de apresentacao sem interacao | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `style` | Configuracao especifica de runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |
| `attr` | Configuracao especifica de runtime | false | override | runtime linkage verified for core flows (component specs, 2026-03-06). |

### Nested configuration blocks

| Path | Type | Required | Default | Constraints | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata.controlType` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.rows` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.minRows` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.maxRows` | array | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.autoSize` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.resize` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `style.resize` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.cols` | unknown | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.maxLength` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |
| `metadata.minLength` | number | false | n/a | component-defined | Partial; verify per source_of_truth. |

### Input bindings (inbound data)

| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | host-json | component-defined | Primary inbound contract payload. |
| `readonlyMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `disabledMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `visible` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |
| `presentationMode` | boolean | false | host-runtime | not-yet-verified | Host-level behavioral override. |

### Output events

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `valueChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `focusChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `nativeBlur` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |
| `nativeChange` | unknown | runtime-event | Experimental | Validate payload shape against source_of_truth. |

### External side channels

| Channel | Direction | Contract | Failure mode | Notes |
| --- | --- | --- | --- | --- |
| `host/services/storage` | bidirectional | component-defined | component-defined | Side channels variam por componente e host; verificar em source_of_truth. |

### Host/runtime dependencies

| Dependency | Required | Environment | Purpose | Notes |
| --- | --- | --- | --- | --- |
| `material-textarea.metadata.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.metadata.ts`. |
| `material-textarea.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.ts`. |
| `material-textarea.component.html` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.html`. |
| `material-field-metadata.interface.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`. |
| `simple-base-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`. |

## Coverage by surface (obrigatorio)

### Coverage matrix (runtime, schema/type, editor/tooling)

| Surface | Verified | Coverage status | Evidence | Notes |
| --- | --- | --- | --- | --- |
| Runtime | `true` | Active | `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.metadata.ts`, `projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.ts` | Core runtime flows verified via focused component specs on 2026-03-06; editor/tooling coverage remains independent. |
| Schema/Types | `true` | Active | source_of_truth + Detailed API reference | Reconcile schema/types with canonical paths during follow-up when needed. |
| Editor/Tooling | `false` | Partial | `projects/praxis-core/src/lib/metadata/field-selector-control-type.constants.ts`, `projects/praxis-dynamic-fields/src/lib/services/component-registry/component-registry.service.ts` | Selector/control-type tooling linkage verified via default selector map and registry seeding; visual editor end-to-end coverage remains not-yet-verified. |

### Runtime coverage boundaries

- Ambientes suportados: browser/dev/prod; SSR/hydration appears to be component-dependent unless explicitly verified.
- Pre-condicoes: payload JSON valido, bindings de host consistentes e dependencias descritas no source_of_truth.
- Fora de cobertura confirmada: caminhos internos, experimentais ou aliases nao enumerados formalmente.

### Editor and tooling notes

- Evidencia de tooling: selector `pdx-*` mapeado em `DEFAULT_FIELD_SELECTOR_CONTROL_TYPE_MAP` e semeado no `ComponentRegistryService`; editor visual E2E permanece not-yet-verified.
- O que esta exposto no editor visual depende da cobertura real do workspace e nao deve ser inferido como suporte runtime total.
- Campos disponiveis apenas via JSON/manual devem continuar no contrato, com rotulo explicito de cobertura parcial.
- Quando houver divergencia entre editor e runtime, manter mismatch rastreavel em secao dedicada.

## Resolution and precedence model (obrigatorio)

### Merge order

1. defaults do componente
2. contrato JSON recebido
3. overrides de host/runtime
4. normalizacoes internas

### Fallback order

contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro

### Override points

- inputs publicos do componente
- configuracao JSON de runtime
- integracoes de host (servicos/tokens/adapters)

### Runtime normalization

Alias e defaults devem convergir para paths canonicos; onde nao houver evidencia, manter not-yet-verified de forma explicita.

### Precedence rules

Em conflito entre alias legado e path canonico, priorizar path canonico e registrar janela de migracao do legado.

## Validation and error semantics (obrigatorio)

### Validation model

| Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
| --- | --- | --- | --- | --- |
| canonical-paths | parse/runtime | component-defined (warn/reject/default) | not-yet-standardized | Semantica detalhada preservada na referencia tecnica por componente. |

### Invalid and unknown field handling

- Campos desconhecidos: comportamento component-defined (ignore, warn ou reject).
- Tipos invalidos: pode haver fallback, warning ou falha, conforme runtime especifico.
- Valores fora de dominio: registrar observed vs desired em Known limitations and mismatches.

### Fail-open / fail-closed behavior

| Condition | Mode | Runtime behavior | Consumer impact |
| --- | --- | --- | --- |
| invalid-or-unknown-field | component-defined | not-yet-verified | Pode gerar warning, fallback silencioso ou rejeicao; validar por componente. |

### Runtime warnings vs hard failures

| Condition | Severity | Observability | Consumer action |
| --- | --- | --- | --- |
| partial-or-declared-only-coverage | warning | logs/eventos do componente | Confirmar ligacao runtime antes de uso critico. |
| mismatch-confirmed | error-or-warning | componente/host observability | Planejar migracao e corrigir contrato/runtime. |

## Detailed API reference
### Preserved technical reference (normalized from previous revision)

### 1. Visao Geral e Quando Usar
`pdx-material-textarea` e o campo multiline orientado por JSON em `@praxisui/dynamic-fields`, baseado em `matInput` + `cdkTextareaAutosize`.

Use quando precisar:
- entrada de texto longo com controle de linhas;
- autosize opcional por conteudo;
- contador de caracteres e estatisticas textuais;
- comportamento de edicao tecnica (ex.: insercao de tab, modo codigo).

### 2. API do Componente (Inputs/Outputs)
| Propriedade | Tipo | Padrao | Obrigatorio | Comportamento |
| --- | --- | --- | --- | --- |
| `metadata` | `MaterialTextareaMetadata` | - | Sim | Contrato principal do campo. |
| `readonlyMode` | `boolean` | `false` | Nao | Sobrescreve leitura no host. |
| `disabledMode` | `boolean` | `false` | Nao | Sobrescreve estado disabled no host. |
| `visible` | `boolean` | `true` | Nao | Controla exibicao no host. |
| `presentationMode` | `boolean` | `false` | Nao | Modo de apresentacao (sem edicao). |

Observacao:
- nao existe output proprio de validacao neste componente; use outputs herdados (`valueChange`, `focusChange`, `nativeBlur`, `nativeChange`) quando necessario.

### 3. Matriz de Cobertura JSON (Completa)
#### 3.1 Campos especificos do componente
| Caminho JSON | Tipo | Status | Comportamento em runtime |
| --- | --- | --- | --- |
| `metadata.controlType` | `'textarea'` | Ativo | Identifica contrato de textarea no host. |
| `metadata.rows` | `number` | Ativo | Define `rows` inicial; fallback para 4 quando ausente/invalido. |
| `metadata.minRows` | `number` | Ativo | Define `cdkAutosizeMinRows`; fallback para 4. |
| `metadata.maxRows` | `number` | Ativo | Define `cdkAutosizeMaxRows`; fallback para 12 e nunca menor que `minRows`. |
| `metadata.autoSize` | `boolean` | Ativo | Ativa `cdkTextareaAutosize` apenas quando `true` (apos view pronta). |
| `metadata.resize` | `'none' \| 'both' \| 'horizontal' \| 'vertical' \| 'auto'` | Ativo | Aplicado em `style.resize` do `<textarea>`. |
| `metadata.cols` | `number` | Ativo | Aplicado no atributo `cols`. |
| `metadata.maxLength` | `number` | Ativo | Aplicado em `maxlength` e integrado a validacao/contador. |
| `metadata.minLength` | `number` | Ativo | Aplicado em `minlength` e validacao do form control. |
| `metadata.showCharacterCount` | `boolean` | Parcial | Exibe contador somente se `maxLength` numerico e maior que zero. |
| `metadata.wrap` | `'soft' \| 'hard' \| 'off'` | Parcial | Aplicado em `attr.wrap`, mas pode ser sobrescrito por `textAreaMode` em runtime. |
| `metadata.spellcheck` | `boolean` | Parcial | Aplicado em `attr.spellcheck`, mas e forcado para `false` em modos code-like. |
| `metadata.textTransform` | `'none' \| 'uppercase' \| 'lowercase' \| 'capitalize'` | Ativo | Consumido via pipeline base de transformacao textual. |
| `metadata.showStats` | `boolean` | Extensao de runtime | Quando `true`, exibe contador de palavras e linhas. |
| `metadata.textAreaMode` | `'plain' \| 'code' \| 'json' \| 'xml' \| 'sql' \| 'log' \| 'markdown'` | Extensao de runtime | Ajusta comportamento de wrap/spellcheck e estilo code-like. |
| `metadata.monospace` | `boolean` | Extensao de runtime | Forca modo code-like para ajuste de UX textual. |
| `metadata.maxLines` | `number` | Extensao de runtime | Bloqueia Enter quando quantidade maxima de linhas e atingida. |
| `metadata.enableTabIndent` | `boolean` | Extensao de runtime | Habilita Tab/Shift+Tab para indentacao/outdentacao dentro do textarea. |
| `metadata.tabSize` | `number` | Extensao de runtime | Tamanho da indentacao por Tab (1..8, padrao 2). |

#### 3.2 Campos herdados compartilhados (exaustivo)
Contrato completo dos campos herdados consumidos por `SimpleBaseInput`:
- [pdx-base-input-runtime-contract.json-api.md](projects/praxis-dynamic-fields/src/lib/base/pdx-base-input-runtime-contract.json-api.md)

Resumo de composicao deste componente:
- `Ativo`: contrato herdado + dimensoes de textarea + autosize + contador.
- `Parcial`: `showCharacterCount`, `wrap` e `spellcheck` dependem de condicoes de runtime.
- `Extensao de runtime`: `showStats`, `textAreaMode`, `monospace`, `maxLines`, `enableTabIndent`, `tabSize`.

### 4. Mapeamento de Comportamento
- Paginacao: nao se aplica.
- Ordenacao: nao se aplica.
- Selecao: texto multiline livre (respeitando regras de validacao).
- Eventos: usa outputs herdados e processa eventos locais de teclado/paste/cut para UX avancada.
- Renderizacao: `mat-form-field` + `<textarea matInput>` com autosize opcional, clear button opcional e hints de suporte.

### 5. Exemplo Minimo (JSON + Uso)
```json
{
  "componentId": "pdx-material-textarea",
  "metadata": {
    "name": "observacao",
    "label": "Observacao",
    "controlType": "textarea",
    "rows": 4
  }
}
```
Uso: renderiza textarea simples com 4 linhas iniciais.

### 6. Exemplo Corporativo (JSON + Uso)
```json
{
  "componentId": "pdx-material-textarea",
  "metadata": {
    "name": "sqlScript",
    "label": "Script SQL",
    "controlType": "textarea",
    "rows": 10,
    "minRows": 6,
    "maxRows": 18,
    "autoSize": true,
    "resize": "vertical",
    "maxLength": 5000,
    "minLength": 10,
    "showCharacterCount": true,
    "showStats": true,
    "textAreaMode": "sql",
    "enableTabIndent": true,
    "tabSize": 2,
    "maxLines": 120,
    "spellcheck": true,
    "wrap": "soft",
    "hint": "Cole ou digite o SQL com padrao corporativo."
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true
}
```
Uso: em runtime atual, `textAreaMode: "sql"` trata o campo como code-like (tende a forcar `wrap="off"` e `spellcheck=false`), mesmo com valores declarados diferentes em `wrap` e `spellcheck`.

### 7. Troubleshooting e Armadilhas Comuns
1. Definir `showCharacterCount=true` e nao ver contador.
Correcao: contador so aparece quando `maxLength` e valido e maior que zero.

2. Definir `autoSize=true` e nao perceber efeito imediato no primeiro ciclo.
Correcao: autosize depende de view pronta; validar apos renderizacao completa do componente.

3. Esperar `wrap` e `spellcheck` estritamente conforme JSON em modos tecnicos.
Correcao: `textAreaMode`/`monospace` podem sobrescrever comportamento para experiencia de codigo.

4. Definir `maxLines` e ainda conseguir quebrar linha via colagem.
Correcao: `maxLines` bloqueia Enter no teclado; entradas por paste podem exigir validacao adicional no host.

5. Configurar `enableTabIndent=true` e receber comportamento inesperado em navegadores antigos.
Correcao: padronizar navegadores suportados e validar UX de teclado no ambiente corporativo alvo.

### 8. Cross-links
- `projects/praxis-dynamic-fields/src/lib/base/pdx-base-input-runtime-contract.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/components/text-input/pdx-text-input.json-api.md`
- `projects/praxis-dynamic-fields/src/lib/components/pdx-year-input/pdx-year-input.json-api.md`

### 9. Relatorio de Validacao Estrutural
- Visao geral: PASS
- API (inputs/outputs): PASS
- Cobertura JSON completa (especifico + herdado): PASS
- Mapeamento de comportamento: PASS
- Exemplo minimo: PASS
- Exemplo corporativo: PASS
- Troubleshooting: PASS

## JSON path index (obrigatorio)

| Path | Type | Required | Default | Status | Notes |
| --- | --- | --- | --- | --- | --- |
| `metadata` | object | true | n/a | Partial | See Detailed API reference. |
| `readonlyMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `disabledMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `visible` | boolean | false | n/a | Partial | See Detailed API reference. |
| `presentationMode` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference. |
| `metadata.rows` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.minRows` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.maxRows` | array | false | n/a | Partial | See Detailed API reference. |
| `metadata.autoSize` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.resize` | number | false | n/a | Partial | See Detailed API reference. |
| `style.resize` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.cols` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.maxLength` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.minLength` | number | false | n/a | Partial | See Detailed API reference. |
| `metadata.showCharacterCount` | boolean | false | n/a | Partial | See Detailed API reference. |
| `metadata.wrap` | unknown | false | n/a | Partial | See Detailed API reference. |
| `attr.wrap` | unknown | false | n/a | Partial | See Detailed API reference. |
| `metadata.spellcheck` | boolean | false | n/a | Partial | See Detailed API reference. |
| `attr.spellcheck` | boolean | false | n/a | Partial | See Detailed API reference. |

## Events reference (obrigatorio)

| Event | Payload | Trigger | Stability | Notes |
| --- | --- | --- | --- | --- |
| `valueChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `focusChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `nativeBlur` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
| `nativeChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |

## Styling API (obrigatorio quando aplicavel)

| Token/Class | Scope | Purpose | Notes |
| --- | --- | --- | --- |
| `style.resize` | component | Styling-related JSON path | Validate against runtime implementation. |

## Examples (obrigatorio)

| Example | Scenario | Validates | Notes |
| --- | --- | --- | --- |
| `Minimal valid` | baseline payload | required contract blocks | Extracted from preserved technical reference when available. |
| `Common setup` | common component usage | standard runtime behavior | Validate against host integration path. |
| `Advanced setup` | richer config with overrides | precedence and normalization | Requires runtime confirmation for edge cases. |
| `Enterprise scenario` | governance/legacy/migration context | auditability and compatibility boundaries | Include tenant-specific constraints when applicable. |

### Minimal valid

```json
{
  "componentId": "pdx-material-textarea",
  "metadata": {
    "name": "observacao",
    "label": "Observacao",
    "controlType": "textarea",
    "rows": 4
  },
  "readonlyMode": false
}
```

### Common setup

```json
{
  "componentId": "pdx-material-textarea",
  "metadata": {
    "name": "sqlScript",
    "label": "Script SQL",
    "controlType": "pdx-material-textarea-common",
    "rows": 10,
    "minRows": 6,
    "maxRows": 18,
    "autoSize": true,
    "resize": "vertical",
    "maxLength": 5000,
    "minLength": 10,
    "showCharacterCount": true,
    "showStats": true,
    "textAreaMode": "sql",
    "enableTabIndent": true,
    "tabSize": 2,
    "maxLines": 120,
    "spellcheck": true,
    "wrap": "soft",
    "hint": "Cole ou digite o SQL com padrao corporativo."
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true
}
```

### Advanced setup

```json
{
  "componentId": "pdx-material-textarea",
  "metadata": {
    "name": "sqlScript",
    "label": "Script SQL",
    "controlType": "textarea",
    "rows": 10,
    "minRows": 6,
    "maxRows": 18,
    "autoSize": 5,
    "resize": "vertical",
    "maxLength": 5000,
    "minLength": 10,
    "showCharacterCount": true,
    "showStats": true,
    "textAreaMode": "sql",
    "enableTabIndent": true,
    "tabSize": 2,
    "maxLines": 120,
    "spellcheck": true,
    "wrap": "soft",
    "hint": "Cole ou digite o SQL com padrao corporativo."
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true
}
```

### Enterprise scenario

```json
{
  "componentId": "pdx-material-textarea",
  "metadata": {
    "name": "sqlScript",
    "label": "Script SQL",
    "controlType": "textarea",
    "rows": 10,
    "minRows": 6,
    "maxRows": 18,
    "autoSize": true,
    "resize": "vertical",
    "maxLength": 5000,
    "minLength": 10,
    "showCharacterCount": true,
    "showStats": true,
    "textAreaMode": "sql",
    "enableTabIndent": true,
    "tabSize": 2,
    "maxLines": 120,
    "spellcheck": true,
    "wrap": "soft",
    "hint": "Cole ou digite o SQL com padrao corporativo."
  },
  "readonlyMode": false,
  "disabledMode": false,
  "visible": true,
  "presentationMode": true
}
```

## Compatibility and migration notes (recomendado)

| Concern | Affected versions | Migration action | Deadline | Notes |
| --- | --- | --- | --- | --- |
| No legacy path detected in current revision | n/a | No migration action required for canonical paths | n/a | Re-evaluate if backward-compat aliases are introduced |

## Known limitations and mismatches (recomendado)

| Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
| --- | --- | --- | --- | --- | --- |
| Canonical contract parity | No confirmed mismatch in this revision; runtime linkage verified for core flows (2026-03-06), with editor/tooling coverage pending | Keep runtime/schema/editor alignment evidence updated | Low | n/a | Monitor in periodic audit |

## Source references (obrigatorio)

| Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
| --- | --- | --- | --- | --- |
| schema-metadata | projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.metadata.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/components/material-textarea/material-textarea.component.html | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| schema-types | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
| runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
