About
A file-tree sidebar for agent workspaces where folders expand, files and bookmarks open, rows reorder by drag/keyboard/menu with rollback on a failed save, and names can be renamed in place with F2.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds AI Sidebar to your project and fits it to your theme.
Code
How AI Sidebar is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import AISidebar, { type SidebarResource } from "@/components/ui/ai-sidebar";
const items: SidebarResource[] = [
{
id: "project-aurora",
label: "Aurora Agent",
kind: "project",
children: [
{
id: "aurora-readme",
label: "README.md",
kind: "file",
},
{
id: "aurora-src",
label: "src",
kind: "folder",
children: [
{ id: "aurora-index", label: "index.ts", kind: "file" },
{ id: "aurora-agent", label: "agent.ts", kind: "file" },
],
},
{ id: "aurora-bookmark", label: "Pricing research", kind: "bookmark" },
],
},
{
id: "project-nimbus",
label: "Nimbus Agent",
kind: "project",
children: [
{ id: "nimbus-plan", label: "plan.md", kind: "file" },
{ id: "nimbus-notes", label: "Meeting notes", kind: "bookmark" },
],
},
];
export default function AISidebarDemo() {
return (
<div className="w-full max-w-xs rounded-xl border border-border bg-background p-2">
<AISidebar
defaultItems={items}
defaultExpandedIds={["project-aurora", "aurora-src"]}
defaultActiveId="aurora-readme"
/>
</div>
);
}
















