nikolas-sapa

Tree Root Trace

Navigation

About

An animated file/nav tree whose indentation guides are SVG paths that draw downward and branch into child rows as nodes expand, instead of static border-left lines.

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

Code

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

Usage.tsx

"use client";

import TreeRootTrace from "@/components/ui/tree-root-trace";

const nodes = [
  {
    id: "src",
    label: "src",
    children: [
      {
        id: "components",
        label: "components",
        children: [
          { id: "button", label: "button.tsx" },
          { id: "input", label: "input.tsx" },
          { id: "tree-root-trace", label: "tree-root-trace.tsx" },
        ],
      },
      {
        id: "hooks",
        label: "hooks",
        children: [{ id: "use-tree", label: "use-tree.ts" }],
      },
      { id: "app", label: "App.tsx" },
    ],
  },
  {
    id: "public",
    label: "public",
    children: [{ id: "favicon", label: "favicon.ico" }],
  },
  { id: "package", label: "package.json" },
  { id: "readme", label: "README.md" },
];

export default function TreeRootTraceDemo() {
  return (
    <div className="w-full max-w-sm rounded-lg border border-border bg-background p-4">
      <TreeRootTrace
        label="Project files"
        nodes={nodes}
        defaultExpandedIds={["src", "components"]}
      />
    </div>
  );
}

More by nikolas-sapa

View all
  • Dye Whorl

    Dye Whorl

    138
  • Countdown Vapor Digits

    Countdown Vapor Digits

    122
  • Hero Burin Hatch

    Hero Burin Hatch

    62
  • Background ASCII Wake

    Background ASCII Wake

    55
  • Hero Text Ring Funnel

    Hero Text Ring Funnel

    48
  • Toast Gravity Stack

    Toast Gravity Stack

    46
  • Hero ASCII Schlieren

    Hero ASCII Schlieren

    45
  • Hero ASCII Reaction Front

    Hero ASCII Reaction Front

    41

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