Loading...
Installation
Props
Prop | Type | Default | Description |
---|---|---|---|
treeData | FileNode[] | [] | Initial tree data |
initialExpanded | string[] | [] | Initially expanded node IDs |
initialSelected | string | null | null | Initially selected node ID |
onSelect | (node: FileNode) => void | - | Callback when node is selected |
onDelete | (node: FileNode) => void | - | Callback when node is deleted |
onCreate | (parent?: FileNode, type?: "file" | "folder", name?: string) => void | - | Callback when node is created |
onRename | (node: FileNode, newName: string) => void | - | Callback when node is renamed |
Features
- CRUD Operations: Create, read, update, delete files and folders
- Expandable Tree: Collapsible folder structure
- Context Menu: Right-click actions
- Inline Editing: Rename files and folders
- Selection State: Track selected items
- Keyboard Navigation: Arrow key support
- Tooltips: Helpful action hints