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

    794
  • Vercel Notification Popover

    Vercel Notification Popover

    156
  • Morphing Dialog

    Morphing Dialog

    109
  • Expandable Dialog

    Expandable Dialog

    7
  • Unsplash Gallery Dialog

    Unsplash Gallery Dialog

    2
  • Autocomplete

    Autocomplete

    1
  • Team Management Dialog

    Team Management Dialog

More in Navigation

View all
  • Sidebar

    Sidebar

    235
  • Navbar with Theme Toggle

    Navbar with Theme Toggle

    43
  • Sidebar

    Sidebar

    339
  • Tabs

    Tabs

    60
  • Numberless Pagination with Text

    Numberless Pagination with Text

    11
  • Oversized 404 Numeral

    Oversized 404 Numeral

    50
  • Footer

    Footer

    446
  • Pagination

    Pagination

    43