Prompt Input

Where a generation starts: a prompt that grows with its text, with reference images pasted or dropped right on it.

In use

The dock of every studio, with its tools, settings and cost in the toolbar. Over balance, only submit locks; the model can still change.

Lumen
CreateEditVideo
240 credits

Your image will appear here

Your image will appear here

Your image will appear here

Your image will appear here

16 credits

Installation

pnpm dlx shadcn@latest add https://mgp.paukraft.com/r/prompt-input.json

PromptInput

PropTypeDefault
onSubmit(prompt: string) => void

Enter or the button, with the trimmed prompt.

—
value / defaultValuestring

The prompt. Controlled with onValueChange.

—
busyboolean

A generation is in flight; submitting waits.

false
onStop() => void

Turns the button into stop while busy.

—
onFilesAdd(files: File[]) => void

Image files pasted or dropped anywhere on the prompt, e.g. ReferenceTray's onAdd.

—
placeholderstring

PromptInput only.

"Describe an image…"
toolbarReactNode

PromptInput only: controls before the submit button.

—

Parts

PropTypeDefault
PromptInputRoot<form> + the props above

The surface. Clicks on its padding focus the prompt.

—
PromptInputTextarea<textarea> props

Grows with its text. Enter submits, Shift + Enter adds a line.

—
PromptInputToolbar<div> props

The row below; its last child sits at the end.

—
PromptInputSubmitButton props

Generate, or stop while busy.

—
usePromptInput() => { value, setValue, submit, busy, … }

For your own controls, e.g. a prompt enhancer.

—