Patrick Xin

Collapsible File Tree

Navigation

About

A file tree with collapsible folders, file-type icons, and colored badges for building file explorers and navigation panels.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Collapsible File Tree to your project and fits it to your theme.

Code

How Collapsible File Tree is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import CollapsibleFileTree from "@/components/ui/collapsible-file-tree";

export default function Demo() {
  return (
    <div className="flex w-full justify-center p-6">
      <CollapsibleFileTree />
    </div>
  );
}

Dependencies

More by Patrick Xin

View all
  • Onboarding Dialog

    Onboarding Dialog

    798
  • Vercel Notification Popover

    Vercel Notification Popover

    157
  • Morphing Dialog

    Morphing Dialog

    115
  • Expandable Dialog

    Expandable Dialog

    7
  • Unsplash Gallery Dialog

    Unsplash Gallery Dialog

    3
  • Autocomplete

    Autocomplete

    1
  • Team Management Dialog

    Team Management Dialog

More in Navigation

View all
  • Sidebar

    Sidebar

    296
  • Progress Bar Stepper

    Progress Bar Stepper

    44
  • Tabs

    Tabs

    16
  • Navbar

    Navbar

    1
  • Breadcrumb

    Breadcrumb

    103
  • Capsule Tabs

    Capsule Tabs

    21
  • Pagination

    Pagination

    27
  • Pagination with Ellipsis

    Pagination with Ellipsis

    18