Ballmac UI home

Finder Window

A working mini Finder: sidebar shortcuts, back and forward history, icon and list views, search, click, shift and command selection, keyboard navigation and a path bar, on a macOS window.

Favorites

Documents

Double-click a file or press Return to open it.

Installation

$ pnpm dlx shadcn@latest add @ballmac/finder-window

Usage

import { FinderWindow } from "@/components/ballmac/finder-window"

The full example is in the Code tab above.

Examples

List view

Locations

Projects

API reference

PropTypeDefault
root*

The top of the file tree: a folder or drive whose children can be browsed.

FinderNode—
sidebar

Sidebar shortcuts. Each item opens the folder with that id.

FinderSidebarSection[]—
defaultFolder

Folder to start in, as the id of any folder in the tree. Defaults to the root.

string—
view

"icons" is a grid, "list" shows kind, size and date.

"icons" | "list"—
onOpenFile

Called when a file is opened (double-click or Return).

(file: FinderNode) => void—
onSelectionChange

Called whenever the selection changes.

(ids: string[]) => void—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Arrow keysMove the selection; Shift extends it
Enter / Cmd+DownOpens the item
Cmd+UpOpens the parent folder
Screen readersA multi-select listbox named by the folder; the path bar and item count are announced

Use with AI

<FinderWindow root={tree} sidebar defaultFolder view onOpenFile onSelectionChange />. root is a FinderNode tree (folder, file or drive). Double-click or Return opens; Cmd+Up goes to the parent folder. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Finder Window (@ballmac/finder-window) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Product demos and docs that show a file system
  • Mac-style apps

Not for

  • A real file manager for your app (file-browser)
  • A single window frame (mac-window)

Registry JSON: https://ui.ballmac.com/r/finder-window.json

Credits

Free to use in personal and commercial projects.