Power-User Systems

File Explorer

A persistent three-pane file manager that stores real image, video, and blob uploads 100% client-side — OPFS when available, IndexedDB everywhere else — with nested folders, search, sort, drag-and-drop upload, move, and a live preview panel.

Install

bun add lucide-react motion react-resizable-panels

Then copy 24 files into your project:

  • components/registry/file-explorer/file-explorer.tsx
  • components/registry/file-explorer/auto-scroll.tsx
  • components/registry/file-explorer/breadcrumb.tsx
  • components/registry/file-explorer/context-menu.tsx
  • components/registry/file-explorer/detail-panel.tsx
  • components/registry/file-explorer/empty-state.tsx
  • components/registry/file-explorer/file-grid.tsx
  • components/registry/file-explorer/file-list.tsx
  • components/registry/file-explorer/folder-tree.tsx
  • components/registry/file-explorer/inline-rename.tsx
  • components/registry/file-explorer/storage-meter.tsx
  • components/registry/file-explorer/thumbnail.tsx
  • components/registry/file-explorer/toolbar.tsx
  • components/registry/file-explorer/undo-snackbar.tsx
  • components/registry/file-explorer/types.ts
  • components/registry/file-explorer/use-file-explorer.ts
  • components/registry/file-explorer/use-file-store.ts
  • components/registry/file-explorer/use-object-url.ts
  • components/registry/file-explorer/util.ts
  • components/registry/file-explorer/store/index.ts
  • components/registry/file-explorer/store/types.ts
  • components/registry/file-explorer/store/idb-store.ts
  • components/registry/file-explorer/store/memory-store.ts
  • components/registry/file-explorer/store/opfs-store.ts

Props

PropTypeDefaultDescription
defaultView"grid" | "list""grid"Initial content layout. The toolbar toggle overrides it live.
thumbnailSizenumber112Grid tile edge length. Larger tiles, fewer columns.
density"comfortable" | "compact""comfortable"Row height and padding for the list view and folder rail.
sortBy"name" | "date" | "size" | "type""name"Initial sort field. The toolbar sort menu overrides it live.
sortDir"asc" | "desc""asc"Initial sort direction.
showFolderRailbooleantrueShow the left folder-tree rail.
showDetailsbooleantrueOpen the detail panel when a single file is selected.
showHiddenbooleanfalseReveal entries whose name starts with a dot.
allowUploadbooleantrueEnable drag-and-drop and the Add button. Off makes the explorer read-only for new files.
allowDeletebooleantrueEnable delete, rename, and move. Off locks the store's contents.
undoWindowMsnumber5000Grace period to undo a delete. 0 deletes immediately.
accentstring (hex)"#a855f7"Selection highlight, active folder, and focus accent.

What It Demonstrates

Drag
Moving an element by grabbing it, often with momentum when released.
Layout animation
When an element's size or position changes, it animates to the new spot instead of snapping.

Related Components

Appears In