AI Input I

AI Input I

An editorial AI chat input — attachment dropdown for images and documents, web-search and deep-think toggles, a model selector, and a live character counter.

Installation

▸ Run the following command

npx shadcn@latest add https://www.mellowui.com/r/prompt-composer.json

▸ Or install manually

  1. Copy the source from the Code tab above.
  2. Place it at components/mellow/prompt-composer.tsx
  3. Import and use.

API Reference

PropTypeDefaultDescription
modelsstring[]["mellow-4-opus", "mellow-4-sonnet", "mellow-4-mini"]Model ids shown in the selector dropdown.
defaultModelstringmodels[0]Initially selected model.
placeholderstring"Set your question in type…"Placeholder text for the prompt textarea.
maxLengthnumber4000Character limit, reflected in the live counter.
disabledbooleanfalseDisables all input while a response is streaming.
enableSoundbooleantruePlay a synthesized typewriter carriage-return (thock + faint bell) on submit.
onSubmit(message: PromptMessage) => voidCalled on send with { text, model, attachments, webSearch, deepThink }.
classNamestringAdditional CSS classes.