caliper uidocs

File manager

Pro

A file browser with folders, selection, rename and delete.

Installs components/ui/file-manager.tsxDepends on @radix-ui/react-popover, @radix-ui/react-slot, lucide-reactMotion none in component source
pnpm dlx shadcn@latest add @caliper/file-manager
  • Brand
  • Contracts
  • Q3 report.pdf
  • Roadmap.xlsx

Drag files in to upload. Enter opens, F2 renames, Delete removes.

When to use #

Use it for

  • Letting users manage uploaded documents.
  • Bulk actions are needed.

Skip it when

  • A single upload is enough; use the dropzone.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/file-manager

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { FileManager } from "@/components/ui/file-manager"

The worked example comes with Pro

The 27-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

FileManager

component
PropTypeDefault
items *readonly FileItem[]—
onRename *(id: string, name: string) => void—
onDelete *(ids: string[]) => void—
onRestore *(ids: string[]) => void—
onMove *(ids: string[], folder: string | null) => void—
onUpload *(names: string[], folder: string | null) => void—
classNamestring—

Accessibility #

It exposes status, listbox, option and presentation semantics, with aria-label, aria-current, aria-hidden, aria-multiselectable, aria-activedescendant and aria-selected kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
↓Moves to the next item or value.
↑Moves to the previous item or value.
EnterActivates the focused control.
BackspaceRemoves the previous character or item.
DeleteRemoves the next character or the selected item.
SpaceActivates the focused control.
EscapeCloses or cancels, then returns focus to where it came from.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.