RetroTreeView

A Finder list view / Folder List tree with disclosure triangles, sortable column headers, multi-select and full keyboard navigation.

Installation

npx shadcn@latest add "https://nostalgia-ui.com/r/retro-tree-view.json"

Setup: installing any component also installs nostalgia-theme (the --os9-* tokens and os9-* utilities) via registryDependencies. To add the theme on its own: npx shadcn@latest add https://nostalgia-ui.com/r/nostalgia-theme.json

Import

import { RetroTreeView } from "@/components/ui/retro-tree-view"

Usage

<RetroTreeView
  aria-label="Macintosh HD"
  items={items}
  columns={[
    { key: "label", header: "Name" },
    { key: "modified", header: "Date Modified", width: 150 },
    { key: "size", header: "Size", width: 70, align: "right" },
    { key: "kind", header: "Kind", width: 140 },
  ]}
  defaultSort={{ column: "label", direction: "asc" }}
  selectionMode="multiple"
  onActivate={(node) => open(node)}
/>

Finder List View

Click a column header to sort (click again to reverse). Shift- and Cmd/Ctrl-click to extend the selection. Use arrow keys, Home/End, type-ahead, and Enter to open.

ApplicationsOct 26, 1999—folder
Internet ExplorerSep 17, 19998.2 MBapplication program
SimpleTextAug 2, 199996Kapplication program
Read MeOct 23, 199920KSimpleText document

Selected: none · Last opened: none

Folder List (no columns)

Documents
Letter to Steve
Budget 2000
Empty Folder
Read Me

Without icons

System Folder
Finder
System
Read Me