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

    807
  • Vercel Notification Popover

    Vercel Notification Popover

    164
  • Morphing Dialog

    Morphing Dialog

    129
  • Expandable Dialog

    Expandable Dialog

    10
  • Unsplash Gallery Dialog

    Unsplash Gallery Dialog

    5
  • Autocomplete

    Autocomplete

    2
  • Team Management Dialog

    Team Management Dialog

More in Navigation

View all
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    76
  • Footer with Big Wordmark

    Footer with Big Wordmark

    40
  • Sidebar

    Sidebar

    392
  • Oversized 404 Numeral

    Oversized 404 Numeral

    78
  • Navbar with Theme Toggle

    Navbar with Theme Toggle

    67
  • NavBar

    NavBar

    2
  • Pagination

    Pagination

    109
  • Tabs like bookmark

    Tabs like bookmark

    82