NinA AI Agency

AI prompt box

An auto-growing input with a model picker, a thinking animation and a reply that appears word by word.

TypeFree
Works inClaude CodeChatGPT CodexGemini CLIGitHub CopilotCursorLovablev0

Prompt plus working code in one go. Paste it into Claude Code, Codex, Gemini, Copilot or Cursor.

Build an interactive UI element: AI prompt box.

What it is: An auto-growing input with a model picker, a thinking animation and a reply that appears word by word.

Behaviour:
- Textarea that grows up to 120px high; Enter sends, Shift+Enter adds a new line.
- Row of model choices (for example Claude, GPT, Gemini) as buttons with role="radio"; the selected one is filled.
- Round send button bottom right, disabled while the field is empty, in the accent colour when active.
- After sending: the question as a bubble on the right, below it "<model> is thinking..." with a shimmering text animation; after about a second the reply appears word by word (about 55 ms per word).
- Use a fixed sample reply, or connect it to my own AI endpoint if there is one.

Requirements:
- Work in this project's stack. If it is React with Tailwind CSS, make a single component without extra packages; otherwise plain HTML, CSS and JavaScript.
- Fully operable with keyboard and touch, with the right aria attributes.
- Respect prefers-reduced-motion: less or no movement.
- Use the colours, fonts and border radii of my project.
- At the end, show me where the component lives and how to use it.
- Put a short credit at the top of the file as a comment: "Based on the AI Toolkit by NinA AI Agency, https://www.nina-ai.nl/en/toolkit/ui/ai-prompt-invoer". Keep it there.

Keep playing