PromptInputTextarea
Auto-expanding textarea. Inherits state and disabled from its PromptInput parent via DI. Uses field-sizing: content with a JS fallback for older browsers.
Basic usage
html
<prompt-input>
<prompt-input-textarea
placeholder="Ask anything…"
[maxHeightPx]="240"
[maxLength]="4000"
/>
</prompt-input>API — Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| placeholder | string | 'Ask anything…' | Native placeholder text. |
| rows | number | 1 | Initial row count. |
| maxLength | number | null | null | Hard cap on character count. |
| maxHeightPx | number | 192 | Maximum height before scroll. 12rem default. |
| ariaLabel | string | 'Prompt' | aria-label for the textarea. |
API — Methods
| Name | Type | Description |
|---|---|---|
| focus() | () => void | Focus the textarea programmatically. |
| blur() | () => void | Blur the textarea. |
Accessibility
- Renders a native
<textarea>witharia-multiline="true" aria-disabledmirrors parent'sdisableddata-stateattribute exposes parent state- Automatically disables while parent is in
submittedstate