Skip to content

Conversation List

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.

On this page
Used for
  • Chat history sidebar
  • Pin a chat
  • Rename a chat
  • Search past chats
  • Delete a chat

Examples

Empty

Installation

npx knowns-ui@latest add conversation-list
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

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
Defaulttrue / "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
Defaultnow
Fix the clock so day groups are stable in tests and docs.
empty
ReactNode
Default"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

  1. 01Groups chats into Pinned, Today, Yesterday and Earlier by updatedAt, newest first, and leaves out groups that are empty.
  2. 02Filters as you type in the search box, matching every word of the query in a title and ignoring case and accents.
  3. 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.
  4. 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.
  5. 05Keeps the list to one tab stop, with Up, Down, Home and End moving between rows and Enter opening a chat.
  6. 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

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" }).

Need help?

Stuck on Conversation List, or found something off? We read every message.