ngx-prompt-kit

Prompt Input

A chat-style input with autosizing textarea, action slot, and submit on Enter (Shift+Enter for newline).

Examples

Basic input

Type and press Enter to submit. The value below shows what was sent.

Last submitted:

Multiple actions

Multi-action toolbar — attach, voice, send.

Installation

Add the prompt-input component (and the cn() utility) to your project.

ng generate ngx-prompt-kit:prompt-input

Component API

PkPromptInput

PropTypeDefaultDescription
valuemodel<string> '' Two-way bound text value.
isLoadingboolean false Disables submit and shows the loading state.
disabledboolean false Disables the input entirely.
maxHeightnumber | string 240 Cap on the autosizing textarea height.
submittedoutput<void>Fires on Enter (without Shift) or programmatic submit().
classstringExtra classes for the wrapper.

PkPromptInputTextarea

PropTypeDefaultDescription
placeholderstring '' Native textarea placeholder.
disableAutosizeboolean false Skip auto height adjustment.
classstringExtra classes for the textarea.

PkPromptInputActions

PropTypeDefaultDescription
classstringExtra classes for the action row.

PkPromptInputAction

PropTypeDefaultDescription
tooltipstringTooltip label (required).
side"top" | "bottom" | "left" | "right" "top" Tooltip placement.
classstringExtra classes for the tooltip content.