Launch priceOne payment

Prompt Composer

Prompt Input with everything a real product adds. Files attach by button, drop or paste, and one that is refused says why. Typing / opens commands and @ points the question at a person or document, both driven from the keyboard. `onSubmit` receives text, files, model, mentions and toggles as one object.

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

A refused file says why, and the rest still go through

Too large, the wrong type, one too many: each is named beside the file it applies to. Dropping five files where one is over the limit attaches four and explains the fifth.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Prompt Composer for this.
Install it: npx shadcn@latest add @layro/prompt-composer
Import it from @/components/ui/prompt-composer.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
onSubmit(message: ComposerMessage) => void—
attachbooleanShow the attach button and accept dropped and pasted files. Default true.
defaultAttachmentsComposerAttachment[]—
onAttachmentsChange(attachments: ComposerAttachment[]) => void—
acceptstringAs for a file input: ".pdf,.csv,image/*".
maxFilesnumberDefault 5.
maxFileSizenumberBytes. Default 10 MB.
modelsComposerModel[]—
modelstring—
defaultModelstring—
onModelChange(id: string) => void—
commandsComposerCommand[]Opened by typing "/".
mentionsComposerMention[]Opened by typing "@".
togglesComposerToggle[]—
defaultTogglesstring[]—
onTogglesChange(ids: string[]) => void—

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themebuttondropdown-menuprompt-input

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in AI Chat

All AI Chat components