React AI chat UI components
12 AI chat UI componentsLive previewFull source in your repo
The interface layer for an LLM product: the prompt box, the thinking state, the model picker and the attachments. Bring your own provider.
Works with
- React
- Next.js
- TypeScript
- Tailwind CSS
AI prompt input and chat controls
The parts of an AI interface a user actually touches: where they type, what they attach, which model they are talking to, and the button that sets it to work.
AI Chat InterfaceA complete AI chat interface for React: streaming replies, web search with cited sources, stop, retry and a model picker.
AI Prompt InputAn expanding prompt area with a glowing drop zone that breathes open to meet you as you type a thought or drag a file.
AI Model SelectorAn AI model selector dropdown that scales out from its trigger and glides the selection pill to whichever model you pick.
AI ButtonAn AI button for React that runs your async action, with an animated sparkle, a shimmering loading label, stop and done.
Chatbot loading, streaming and voice states
An LLM response takes seconds, not milliseconds. These are the chatbot UI states that fill that gap without making the wait feel broken.
AI Typing IndicatorA typing indicator for React AI chat: typing dots in a bubble, or a thinking label that names each step with its own icon.
AI Agent UIAn AI agent UI for React that shows each tool call and reasoning step live, with streamed output, timings and approvals.
Animated Loading SkeletonAn organic loading state instead of a spinner, with a slow aurora that breathes in the space where your content will land.
Voice Reactive OrbA breathing voice orb that swells with speech and settles between turns, never jittery and always organic to look at.
ChatGPT OrbLow-power WebGL fractal noise that blooms white ink inside a soft circular mask.
Siri OrbA glassy WebGL sphere with a prism ribbon sweeping a full spectrum through it.
AI OrbA near-black glass sphere with a violet rim that drifts while a model generates.
AI Image Loading AnimationDots rise from a dark floor, form the picture, and clear into the photograph.
Chat building blocks: inputs, loaders, avatars and notifications
General parts a chat screen is assembled from: a text area and attachments, command search, loading shimmers, avatars for each speaker, a scroll area for long threads, an animated code diff, and toasts for background tasks.
- TextareaTextareaA React textarea that auto resizes between min and max rows, with a live character count that warns near the limit and default, filled, or ghost styles.
- AttachmentAttachmentReact file attachment rows for uploads and chat, with icons by file type, readable sizes, upload progress, retry, download, and image preview cards.
- CommandCommandA React command palette on Base UI with keyword search, grouped actions, nested pages, and shortcut hints, plus a Cmd K dialog to open it anywhere.
- KbdKbdA React kbd component that renders real kbd tags for keyboard shortcuts, with key combinations, key sequences, command rows, and an inline size.
Shimmering Skeleton WrapperOne angled GPU sweep that travels across any placeholder geometry you wrap, never a separate shimmer stuttering per row.
Text ShimmerA CSS shimmer sweep for headlines, one single element and entirely GPU-friendly.
Animated TerminalA terminal UI with self-typing commands, CRT phosphor glow and scanlines, streaming output that never re-renders a line.- AvatarAvatarA React avatar on Base UI that falls back to colored initials, with status dots, overlapping avatar groups with a +N chip, tooltips, and upload previews.
- Scroll AreaScroll AreaA React scroll area on Base UI with slim custom scrollbars that hide until you scroll, for vertical, horizontal, or two way overflow panels and lists.
Animated Code Diff ViewerInline or toggled code diffs rendered inside the same polished code block frame, flipping between before and after.- ToastToastReact toast notifications on Base UI in info, success, warning, error, and action styles, with swipe to dismiss, six positions, and a hook to fire them.
Dynamic Island ToastA pixel-faithful Apple Dynamic Island that morphs, splits, and breathes while it hosts live activities inside your app.
Google-Style Search BarA Google AI Mode search bar with a rainbow that travels the rim, cycling typewriter prompts, and an inline Google wordmark.
Chatbot UI design: what makes an AI chat interface feel fast
A chatbot UI is the part of an AI product people actually see: the message list, the prompt input, the model picker, the attachments and the states in between. The hard part is not the message bubbles. It is the several seconds between the user pressing enter and the first token arriving, which is far longer than any normal interface delay and outside your control. Everything that makes an AI chat interface feel fast or slow happens in that window.
A plain spinner is the weakest thing you can put in that gap, because it only says that something is happening. A better waiting state suggests the shape of the answer. Animated Loading Skeleton fills the response area with something that reads as text taking form, and Shimmering Skeleton Wrapper does the same around any layout you already have. The eye settles where the answer will appear, so there is no jump when the first token lands. When the wait is mostly searching and reading, say so: AI Typing Indicator names each step, such as Searching the web or Writing, with its own animated icon, and falls back to plain typing dots in a reply bubble.
Once the model calls tools, the wait stops being one thing. An agent might search the web, read a file, run a command and edit code before it answers, and an agent UI that hides all of that behind one spinner asks for blind trust. Show each tool call as its own step with its output, fold finished steps so a long run stays easy to scan, and stop for approval before anything that cannot be undone, such as a push or a payment. AI Agent UI renders that run from a steps array, with terminal output, code diffs and Allow and Deny buttons.
Once tokens start streaming, do not print each chunk the moment it lands. Models send text in uneven bursts, so buffer the chunks and release whole words on a steady beat, a little faster when the buffer runs long. If words fade in, keep the fade short and soft, so the eye reads a sentence forming instead of chasing moving text. Keep the view pinned to the bottom only while the user has not scrolled up to reread something. AI Chat Interface works this way out of the box, with stop, retry and cited web sources around it.
The prompt input carries more weight than its size suggests, because it is on screen at every moment. It has to grow with the content rather than scroll inside a tiny box, take a pasted page of text without breaking the layout, submit on Enter while keeping Shift and Enter for a new line, and make attachments obvious before sending. AI Prompt Input covers all four and hands you the text, the files and the chosen model in one onSubmit call.
Not every AI feature needs a chat. Often it is one action inside a screen you already have: summarize this thread, rewrite this paragraph, generate a title. An AI button is the right shape for that. Mark it with the sparkle people now read as AI, keep the label a plain verb such as Generate, and let the button carry the wait itself: a loading label while the model works, a way to stop, and a clear done or try again at the end, so nobody clicks twice. AI Button switches those states from the promise your onClick returns and hands you an abort signal for the fetch.
Model choice belongs next to the input, not in a settings page. AI Model Selector keeps the active model visible and switchable mid conversation, which matters once a product offers a fast model and a careful one. Show the model name in plain words and keep the list short, because a long picker turns a chat into a configuration screen.
Voice needs one honest signal above all: whether the microphone is listening. That is a privacy question before it is a design one. Voice Reactive Orb reads the microphone through the Web Audio API when you let it, releases the stream as soon as listening stops, and can instead be driven by a level you pass in, such as the volume of a spoken reply. Either way the visual follows real sound rather than a decorative loop.
Keep the interface provider agnostic. None of these components imports a model SDK or handles an API key, so the same chat UI works with the AI SDK, a direct fetch to any provider, or your own endpoint. That keeps the front end useful through the model switch most teams make at least once.
