# PromptInput

Source: https://lumeo.nativ.sh/components/prompt-input

# PromptInput

Multiline AI prompt textarea with submit and keyboard shortcuts.

## When to Use

-   Build chat interfaces, AI assistant prompts, or command inputs.
-   Use Enter to submit and Shift+Enter for newlines — built in.
-   Add leading or trailing content slots for model selectors, voice input, and file attachments.

Preview Code

Basic

Copy Code

Preview Code

Loading State

Copy Code

Preview Code

With Leading and Trailing Content

Shift+Enter for newline

Copy Code

## Keyboard Interactions

Key

Action

Enter

Submits the prompt (fires `OnSend`).

Shift + Enter

Inserts a newline without submitting.

## API Reference

### PromptInput

Property

Type

Default

Description

Value

string?

null

Current text value. Use `@bind-Value` for two-way binding.

ValueChanged

EventCallback<string?>

—

Fires on each keystroke. Used by `@bind-Value`.

OnSend

EventCallback<string>

—

Fires when the user presses Enter or clicks the send button. Receives the current value.

Placeholder

string

"Ask anything…"

Textarea placeholder text.

IsLoading

bool

false

Disables the textarea and shows a spinner on the send button.

DisableSendOnEmpty

bool

true

Disables the send button when the input is empty or whitespace-only.

MinHeight / MaxHeight

int

56 / 240

Min and max pixel height for the auto-growing textarea.

LeadingContent

RenderFragment?

null

Slot rendered left of the send button toolbar (file attach, model picker, etc.).

TrailingContent

RenderFragment?

null

Slot rendered right of the send button (hints, character count, etc.).

## Related Components

-   [StreamingText](/components/streaming-text) — Token-by-token streaming text renderer for AI responses.
-   [AgentMessageList](/components/agent-message-list) — Chat message stream for AI agents.
-   [Textarea](/components/textarea) — Plain multiline text input without the AI-chat chrome.
