ChatList
Loading example…
Sidebar list of conversations grouped by date (Hoy, Ayer, Últimos 7 días…).
Import
Section titled “Import”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.
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/ai/chat-list/chat-list.tsx