Back to blocks
BlockAI & ChatFree

Chat History Sidebar React component

The history sidebar of an AI chat app: conversations grouped by date with pinned chats on top, project folders that filter the list, search with highlighted matches, a row menu to rename, pin, archive, move or delete with undo, a collapsible icon rail and a drawer on small screens.

About the Chat History Sidebar component

Chat History Sidebar is the left-hand column of an AI chat app. Conversations are grouped into Today, Yesterday, the last week, the last month and older, with pinned chats kept at the top, so the one you want is usually a glance away.

Projects work like folders: pick one and the list shows only its chats. Search filters as you type and highlights the matching words. Each chat has a menu to rename it in place, pin it, archive it, move it to another project or delete it, and a toast lets you undo the last delete or archive. Collapse it to a slim icon rail on desktop; on a phone it slides in as a drawer.

When to use it

Use it as the history panel of an AI assistant, a support copilot, an internal knowledge chat or any app where people come back to earlier conversations.

Pass daysAgo from your own dates so the groups match the reader's day, and keep project names short so they fit the rail tooltips and row dots.

Installation

Add the Chat History Sidebar component to your project with the shadcn CLI. It lands in components/chat-history-sidebar.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/chat-history-sidebar

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

AI Image Generation Grid
Free
AI Chat Bubble Launcher
Free
Prompt Library Block
Free
Model Picker Block
Free
SEO-ready
Side Marquee Pricing CTA
$4
CTA Banner Section
Free