The history column of a chat app: a search box, pinned chats, groups for today, yesterday and earlier, inline rename and a row menu. One tab stop, arrow keys between rows. It owns no dialogs: you confirm a delete and remove the row.
- Chat history sidebar
- Pin a chat
- Rename a chat
- Search past chats
- Delete a chat
Examples
Empty
Installation
npx knowns-ui@latest add conversation-listPaste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install Conversation list from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/conversation-list
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add conversation-list
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- components/ui/knowns/spinner.tsx
- components/ui/knowns/button.tsx
- components/ui/knowns/kbd.tsx
- components/ui/knowns/field-class.ts
- components/ui/knowns/textarea.tsx
- components/ui/knowns/chat-composer/use-autosize.ts
- lib/knowns/motion.tsx
- lib/knowns/motion-utils.ts
- components/ui/knowns/use-floating.ts
- components/ui/knowns/tooltip.tsx
- components/ui/knowns/tooltip-utils.ts
- components/ui/knowns/input.tsx
- components/ui/knowns/menu.tsx
- components/ui/knowns/blocks/chat/conversation-list.tsx
- components/ui/knowns/blocks/chat/conversation-list-utils.ts
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0, class-variance-authority@^0.7.1.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/conversation-list, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "conversation-list" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- conversations
{ id, title, updatedAt, pinned? }[]- updatedAt is a Date, a timestamp or an ISO string. Order does not matter: groups are sorted newest first.
- activeId / onSelect
string|null / (id) => void- The open chat gets aria-current. onSelect is called on click and Enter.
- onRename
(id, title) => void- Adds Rename to the row menu and F2. Blank or unchanged titles are ignored; the title is trimmed to 120 characters.
- onDelete
(conversation) => void- Adds Delete to the row menu and the Delete key. Confirm, then remove the row; focus moves to the next row.
- onPin
(id, pinned) => void- Adds Pin or Unpin. Pinned chats sit in a group at the top.
- search / searchPlaceholder
boolean / string- Default
true / "Search chats" - Filters titles by every typed word, ignoring case and accents. Escape clears it; Down moves to the first row.
- now
Date|number|string- Default
now - Fix the clock so day groups are stable in tests and docs.
- empty
ReactNode- Default
"No chats yet…" - Shown when conversations is empty.
| Prop | Type | Default | Description |
|---|---|---|---|
| conversations | { id, title, updatedAt, pinned? }[] | - | updatedAt is a Date, a timestamp or an ISO string. Order does not matter: groups are sorted newest first. |
| activeId / onSelect | string | null / (id) => void | - | The open chat gets aria-current. onSelect is called on click and Enter. |
| onRename | (id, title) => void | - | Adds Rename to the row menu and F2. Blank or unchanged titles are ignored; the title is trimmed to 120 characters. |
| onDelete | (conversation) => void | - | Adds Delete to the row menu and the Delete key. Confirm, then remove the row; focus moves to the next row. |
| onPin | (id, pinned) => void | - | Adds Pin or Unpin. Pinned chats sit in a group at the top. |
| search / searchPlaceholder | boolean / string | true / "Search chats" | Filters titles by every typed word, ignoring case and accents. Escape clears it; Down moves to the first row. |
| now | Date | number | string | now | Fix the clock so day groups are stable in tests and docs. |
| empty | ReactNode | "No chats yet…" | Shown when conversations is empty. |
Keyboard: Tab moves into the list on the open row. Up and Down, Home and End move between rows, Enter opens, F2 renames, Delete asks to delete, and each row's menu is the next Tab stop. Groups are labelled regions, and the search result count is announced when nothing matches.
What it handles
- 01Groups chats into Pinned, Today, Yesterday and Earlier by updatedAt, newest first, and leaves out groups that are empty.
- 02Filters as you type in the search box, matching every word of the query in a title and ignoring case and accents.
- 03Renames in place with F2 or the row menu, trims the new title to 120 characters, and keeps it only when it differs from the old one.
- 04Asks the host to delete with the Delete key or the row menu, then moves focus to the next row, or the previous one, after the row goes.
- 05Keeps the list to one tab stop, with Up, Down, Home and End moving between rows and Enter opening a chat.
- 06Marks the open chat with aria-current, and shows your empty content or a "No chats match" line when nothing is listed.
States
- Any change
- Search, rename, pin and delete update the list at once
- none
- Row hover or focus
- The row background and text colour change
- 120ms, ease out
- Row actions
- The more button fades in on hover or focus
- 120ms, ease out
- Rename starts
- The title swaps to an input at once
- none
| State | What moves | Timing |
|---|---|---|
| Any change | Search, rename, pin and delete update the list at once | none |
| Row hover or focus | The row background and text colour change | 120ms, ease out |
| Row actions | The more button fades in on hover or focus | 120ms, ease out |
| Rename starts | The title swaps to an input at once | none |
Works with
When to use
When to use
- The history column of a chat app: find, pin, rename and delete past conversations.
- A sidebar list of saved threads grouped by day.
When not to use
- A whole chat screen with the thread and composer: use Chat App.
- Searching everything in the app: use Command Menu.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Conversation List to my app and wire it to my own data.
- I need the history column of a chat app: find, pin, rename and delete past conversations. Set that up with the Knowns UI Conversation List.
- Which Conversation List props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "conversation-list" }) and search_docs({ query: "conversation list" }).