Skip to content
Uxelith
Prov1.0.0App screens

File Manager

A file manager for your own storage: lasso and multi-select, drag to folders or the Trash, right-click menus, rename in place, Quick Look, Undo and uploads with progress, all by keyboard and touch too.

Installs with Uxelith ProHow
Licence
Pro
Packages
2
Updated
12 Nov 2026
Live

Installation

Usage

example.tsx
"use client"

import { FileManager, type FileItem } from "@/components/file-manager"

const files: FileItem[] = [
  { id: "docs", name: "Documents", kind: "folder", parentId: null, modified: "2026-11-10T09:00:00Z" },
  { id: "plan", name: "Plan.pdf", parentId: "docs", size: 240000, modified: "2026-11-10T09:00:00Z" },
  { id: "harbour", name: "Harbour.jpg", parentId: null, size: 3100000, modified: "2026-11-11T18:30:00Z" },
]

export function Files() {
  return (
    <FileManager
      className="h-[36rem]"
      defaultItems={files}
      onItemsChange={(_items, change) => {
        // Every move, rename, upload and delete arrives here; send it to your storage.
        void fetch("/api/files", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(change) })
      }}
      onUpload={async (file, { parentId, signal }) => {
        const body = new FormData()
        body.append("file", file)
        body.append("parentId", parentId ?? "")
        const response = await fetch("/api/upload", { method: "POST", body, signal })
        return response.json()
      }}
    />
  )
}

Props

PropTypeDefaultDescription
items / defaultItemsFileItem[][]Files and folders: { id, name, parentId?, kind?, size?, modified?, owner?, thumbnail?, starred?, shared?, trashed? }. parentId is the folder an item sits in; leave it out at the top level. Kept by you or by the component.
onItemsChange(items, change) => void—The new list and what happened: create, upload, rename, move, duplicate, star, trash, restore or delete.
onUpload(file, { parentId, signal, onProgress }) => Promise<Partial<FileItem> | void>—Uploads a file to your storage and returns its details. Turns on Upload and dropping files in.
onOpen(item) => void—Opens a file on Enter or double-click. Without it, files open in Quick Look.
onDownload(items) => void—Shows Download in the menus and the selection bar.
folder / defaultFolderstring | nullnullThe open folder; null is the top level.
onFolderChange(folder) => void—Called when another folder opens.
view / defaultView"grid" | "list""grid"Tiles, or rows sortable by name, date and size.
rootLabelstring"My files"Name of the top level.
titleReactNode—Shown at the top of the sidebar.
sidebar / details / filtersbooleantrueThe locations sidebar, the details panel (when wide enough) and the type chips.
storage{ used: number; total: number }—A storage meter in the sidebar, in bytes.
labelstring"Files"Accessible name of the file manager.

Accessibility

  • The files are an ARIA listbox with multiple selection: arrow keys move (up and down by row in the grid), Shift extends, Ctrl or Cmd A selects all, Home and End jump, and typing a name's first letters finds it.
  • Enter opens, F2 renames, Space shows Quick Look, Delete moves to the Trash, Ctrl or Cmd X then V moves, Alt + Up goes to the parent folder, and Shift F10 or the Menu key opens the actions menu.
  • Dragging is never required: "Move to…" lists every folder, and on touch, press and hold opens the menu.
  • Every change is announced in a polite status message, with Undo for moves, renames and the Trash; deleting from the Trash asks first.
  • Quick Look is a modal dialog that keeps focus and returns it to the file; uploads report progress as progress bars and can be cancelled.
  • Under prefers-reduced-motion the selection bar and messages appear without sliding.

Changelog

  1. v1.0.0Latest

    First release.

More in App screens

All 8 in App screens
  • App screensPro

    Comment Thread

    Replies, emoji reactions, @mentions with suggestions, who is typing, comments that show the moment they are sent, and a thread you can resolve. Works with any server.

  • App screensPro

    Dashboard Shell

    An application frame: a sidebar that folds to an icon rail, a search that grows into a ⌘K command palette, stats with sparklines, a dense revenue chart with a 7/30/90-day range and recent orders with status badges.

  • App screensPro

    Mobile App Shell

    The frame of a phone app: a bottom tab bar, a large title that moves into the top bar, screens that slide in with swipe-back, a menu that closes when you pick an item, and a sidebar on wide screens. Each tab keeps its own screens and scroll.