Quick ChatPro
A ready-made AI chat panel. It floats, docks to the side, fills the page or shrinks to a bar, and comes with mentions, a model picker, file uploads, voice input, chat history and streaming replies.
Preview
Open it on its own page ↗| Company | Location | Employees |
|---|---|---|
| Heritage Manufacturing | Berlin, Germany | 200–500 |
| Summit Software Systems | San Francisco, US | 1–10 |
| Quantum Innovations | Paris, France | 100–199 |
| NexGen Solutions | Tokyo, Japan | 500–1000 |
| Synergy Tech | New York, US | 200–500 |
| Apex Dynamics | Sydney, Australia | 11–100 |
| Vertex Systems | Cape Town, South Africa | 500–1000 |
| Elevate Digital | Beijing, China | 200–500 |
New chat with Rune
Ask anything about your customers, contracts or reports.
Usage
1. Put it on the page
Place it inside a box with position: relative. That's all you need to see it working; it
answers with a sample reply until you connect your own AI.
import { QuickChat } from "@/components/ui/quick-chat"
export function Page() {
return (
<div className="relative h-svh">
<QuickChat />
</div>
)
}2. Connect your AI
Pass onSend. It gets the message and returns the answer. Return plain text, or text with the
tools your agent used:
<QuickChat
onSend={async (text, { model }) => {
const res = await fetch("/api/chat", { method: "POST", body: JSON.stringify({ text, model }) })
const data = await res.json()
return { text: data.answer, tools: ["Searched customers"] }
}}
/>3. Stream the answer (optional)
To show words as your server sends them, return an async generator. Pass signal to fetch
so the Stop button really cancels the request.
async function* answer(text: string, { history, model, signal }: QuickChatSendContext) {
const res = await fetch("/api/chat", { method: "POST", body: JSON.stringify({ text, history, model }), signal })
const reader = res.body!.pipeThrough(new TextDecoderStream()).getReader()
while (true) {
const { value, done } = await reader.read()
if (done) return
yield value
}
}
<QuickChat onSend={answer} />4. Open and close it from a button
const [open, setOpen] = useState(false)
<button onClick={() => setOpen(true)}>Quick Chat</button>
<QuickChat open={open} onOpenChange={setOpen} />Layouts
The layout button in the header switches between four layouts. You can also set one with
defaultLayout or control it with layout and onLayoutChange.
| Layout | What it looks like |
|---|---|
popup | A floating card in the top right. Drag its bottom-left corner to resize. |
drawer | A full-height panel on the right. Drag its left edge to resize. |
full | Fills the whole box. |
minimized | Just the header, in the bottom right. Click it to bring the chat back. |
For the drawer to push your content aside instead of covering it, put the chat next to your content in a flex row:
<div className="relative flex h-svh">
<main className="min-w-0 flex-1">{/* your app */}</main>
<QuickChat defaultLayout="drawer" />
</div>Chat history
The clock button in the header opens History: every chat, newest first, grouped by day. Each one shows its full date and time (for example "Oct 26, 2026 · 2:30 AM"), so chats with similar names are easy to tell apart. People can:
- Search by any word in a chat. Matches are highlighted.
- Filter by date with Any time, Today, 7 days or 30 days.
- Click a chat to carry on with it, or press the bin to delete it.
Chats save on their own as people talk. To keep them after a reload, give a storageKey and
they're stored in the browser:
<QuickChat storageKey="my-app-chats" />To save them on your server instead, start from defaultHistory and listen with
onHistoryChange:
<QuickChat defaultHistory={savedChats} onHistoryChange={(chats) => saveChats(chats)} />The header shows the chat's first message as its name. Long names stop after 12 words with "…"; hover over the name to read all of it.
What people can do in the composer
- @ tags an agent or teammate. Typing
@opens the list too. - Model picks which model answers, and its menu has an Extended thinking switch. Both
reach you in
onSendasmodelandthinking. - + attaches files. Pasting or dropping files works too.
- Mic types what they say, where the browser supports speech. Press it again to keep the words, or ✕ to throw them away.
- Stop cancels a reply that's still coming. Retry asks again.
Pass your own lists with mentions and models, or [] to hide a button. The sample lists
use plain line icons in neutral tiles; add a color to an item if you want it tinted.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
onSend | (text, context) => reply | sample reply | Answers a message. Return text, { text, tools }, or a stream. |
agentName | string | "Rune" | Name shown on the welcome screen. |
description | string | — | Line under the welcome heading. |
placeholder | string | — | Placeholder text in the message box. |
suggestions | string[] | 3 prompts | Starter buttons on the welcome screen. [] hides them. |
open / defaultOpen / onOpenChange | boolean | true | Show or hide the panel. |
layout / defaultLayout / onLayoutChange | "popup" | "drawer" | "full" | "minimized" | "popup" | How the panel sits on the page. |
mentions | Mention[] | sample list | Agents and people for @. |
models / defaultModel | ModelOption[] / string | sample list / first | Models in the picker, and which one starts picked. |
defaultThinking | boolean | false | Start with Extended thinking on. |
defaultHistory | QuickChatSession[] | [] | Past chats to show in History. |
onHistoryChange | (chats) => void | — | Called when a chat is saved or deleted. |
storageKey | string | — | Keep history in the browser under this key. |
attachments | boolean | true | Allow file uploads. |
dictation | boolean | true | Show the mic where the browser supports it. |
closable | boolean | true | Show the close button and close on Escape. |
onSend receives (text, context). The context has history (earlier messages), model,
thinking (whether Extended thinking is on), attachments (the files) and signal (aborted on
Stop, New chat or close).
Accessibility
- Escape closes the open menu first, and the panel only when no menu is open
- Every button is labeled, and menus work with the arrow keys, Enter and Escape
- Finished replies are read out to screen readers once, not word by word
- The resize grips work with the arrow keys too
- With reduced motion, replies appear without the blur and the panel fades instead of sliding