Back to Prompt Area

For AI & LLM apps

The React chat input built for AI apps

Prompt Area is a zero-dependency React composer for LLM chatbots and AI products. It brings @mentions, /commands, #tags, and file attachments to your input, and hands your model clean structured data — no editor framework, no lock-in.

Built for AI chat, not documents

Mentions, slash commands, and tags map cleanly to context, actions, and metadata — the primitives every AI composer needs.

Structured output for your model

Read typed chips with getChipsByTrigger() and plain text together. Send exactly what your prompt needs without parsing strings.

Provider-agnostic

Works with OpenAI, Anthropic, the Vercel AI SDK, LangChain, or your own backend. Prompt Area owns the input, not your runtime.

Zero dependencies

No ProseMirror, Slate, or Lexical. Just React and the shadcn registry — a small bundle and a fast integration.

Composable chat UI

Pair the input with Action Bar, Status Bar, Compact, and Chat Prompt Layout companions to assemble a full composer.

Accessible & i18n-ready

ARIA roles, keyboard navigation, and IME/CJK composition handling so your chat works for everyone, in any language.

Drop it into your LLM stack

Install the component, read the message and any structured chips, and send them to your provider. The input does not care which model or framework you use.

const { bind, plainText } = usePromptAreaState()
const mentions = getChipsByTrigger(bind.value, '@').map((c) => c.value)
const command = getChipsByTrigger(bind.value, '/')[0]?.value

await streamChat({
  messages: [{ role: 'user', content: plainText }],
  context: mentions,
  command,
})
npx shadcn@latest add https://prompt-area.com/r/prompt-area.json

Frequently asked questions

What is the best React input component for an AI chatbot?

Prompt Area is a React chat input built specifically for AI and LLM apps. It provides @mentions, /commands, #tags, inline markdown, and file attachments in a single zero-dependency component, and returns structured data you can send straight to your model.

Does Prompt Area work with the Vercel AI SDK?

Yes. Prompt Area is the input layer only, so it drops into any chat stack. Read the plain text (and structured chips) from the composer and pass them to the Vercel AI SDK, OpenAI, Anthropic, or any provider.

Can I use Prompt Area as a ChatGPT- or Claude-style input?

Yes. The component ships example compositions for Claude Code–style and Codex-style inputs, including model selectors and context trays, that you can adapt to your own LLM app.

How do I send mentions and commands to my LLM?

Call getChipsByTrigger(value, "@") for mentions and getChipsByTrigger(value, "/") for commands to get typed values, then include them in your prompt or tool call alongside the message text.

Keep exploring