Mark Yo

AI Sidebar

Navigation

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>
  );
}

Dependencies

More by Mark Yo

View all
  • Loader

    Loader

    71
  • Pricing Table

    Pricing Table

    28
  • Expandable Tabs

    Expandable Tabs

    17
  • Wallet Card

    Wallet Card

    15
  • Bento Grid

    Bento Grid

    15
  • Image Gallery

    Image Gallery

    9
  • CTA Section

    CTA Section

    9
  • Donut Chart

    Donut Chart

    7

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    133
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    368
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    1
  • Sidebar

    Sidebar

    431
  • Pagination with Ellipsis

    Pagination with Ellipsis

    31
  • Button Breadcrumb

    Button Breadcrumb

    43
  • Pagination

    Pagination

    118
  • Navbar

    Navbar

    80