AI product
Chat thread list
past conversations, grouped by when · threads activeId onSelect onNew?
function ThreadsDemo() { const toast = useToast(); const [active, setActive] = React.useState('1'); return ( <ChatThreadList className="w-full" activeId={active} onSelect={setActive} onNew={() => toast.info('Would start a new chat')} threads={[ { id: '1', title: 'Overdue invoices', preview: 'Two clients still owe you…', group: 'Today' }, { id: '2', title: 'VAT return for Q2', preview: 'Your Q2 return is ready to file.', group: 'Today' }, { id: '3', title: 'Rate for a new client', preview: 'Based on your last 12 projects…', group: 'Previous 7 days' }, ]} /> );}Usage
A screen of its own on phones, or inside a Sheet. Title threads by their topic, not “New chat”.
API
<ChatThreadList threads={[{id,title,preview?,group?}]} activeId onSelect onNew? />Get it
Already in every copy of the native kit:
import { ChatThreadList } from '@/components/kit/chat-thread-list';Details
- Exports
ChatThreadList- Packages
- lucide-react-native@^1.21.0
- Installs with
- @halftone-native/button, @halftone-native/icon, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- history, conversations, chat sidebar, threads
- Registry JSON
- /r/native/chat-thread-list.json
function ThreadListDemo() { const [threads, setThreads] = React.useState(THREADS); const [active, setActive] = React.useState('t1'); return ( <ChatThreadList className="border-border bg-sidebar w-full max-w-xs rounded-xl border p-3" threads={threads} activeId={active} onSelect={setActive} onNew={() => { const id = `t${threads.length + 1}`; setThreads((ts) => [{ id, title: 'New conversation', group: 'Today' }, ...ts]); setActive(id); }} /> );}Usage
Beside the conversation on desktop, in a Sheet on small screens. Title threads by their topic, not “New chat”.
API
<ChatThreadList threads={[{id,title,preview?,group?}]} activeId onSelect onNew? />Get it
Already in every copy of the web kit:
import { ChatThreadList } from '@/components/kit/chat-thread-list';Details
- Exports
ChatThreadList- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Installs with
- @halftone-web/button
- Also searched as
- history, conversations, chat sidebar, threads
- Registry JSON
- /r/web/chat-thread-list.json
Agents: the whole registry is at /llms.txt.