Ballmac UI home

File Tree

A folder and file explorer with semantic tree navigation and file-type icons.

src
app
dashboard.tsx
layout.tsx
README.md

Installation

$ pnpm dlx shadcn@latest add @ballmac/file-tree

Usage

import { FileTree } from "@/components/ballmac/file-tree"

The full example is in the Code tab above.

Examples

States and variants

API reference

PropTypeDefault
files*

Files and folders to display.

FileNode[]—
label

Accessible name for the file tree.

string—

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Arrow keys / Home / End / Enter / SpaceNavigates folders and selects files

Use with AI

A folder and file explorer with semantic tree navigation and file-type icons. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI File Tree (@ballmac/file-tree) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Browse a project or document hierarchy

Not for

  • Use Tree View for non-file hierarchies

Registry JSON: https://ui.ballmac.com/r/file-tree.json

Credits

Free to use in personal and commercial projects.