AsterUIDocsv1.0.2

Docs / Component reference

PromptInput

Compose a multiline message. Enter submits it, and Shift+Enter starts another line.

Prompt input example

Install

sh
npx @fierst/ui@1.0.2 add prompt-input

Registry dependencies: theme, icon. Package dependencies: @lucide/icons.

Exports from ./ui/prompt-input: PromptInput.

Download the registry source for prompt-input 1.0.2.

API contracts

ts
export function* PromptInput(
  props: {
    value?: string;
    placeholder?: string;
    streaming?: boolean;
    disabled?: boolean;
    leading?: View;
    onAttach?: () => void;
    onChange?: (val: string) => void;
    onSubmit?: (prompt: string) => void;
    onStop?: () => void;
    class?: string;
  },
  ctx: Ctx,
)