Skip to content

ChatList

Open .md
Live preview

Loading example…

Sidebar list of conversations grouped by date (Hoy, Ayer, Últimos 7 días…).

import { ChatList } from "@jcsoftdev/ui/ai";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/ai/chat-list.

<ChatList items={ITEMS} activeId="2" now={NOW} />
Prop Type Default Description
items * ChatListItem[]
activeId string
onSelect ((id: string) => void)
onNew (() => void)
onDelete ((id: string) => void) Shows a delete button per row.
now string | number | Date Reference date for the groups; defaults to the current time. Pass it for stable output.
label string "Conversaciones" Accessible name of the navigation landmark.
emptyText string "Aún no hay conversaciones."
className string

* marks a required prop.

packages/ui/src/ai/chat-list/chat-list.tsx