File Tree

Composable file and folder primitives with springing branches, a gliding selection, and complete keyboard navigation.

Preview

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/file-tree

API Reference

FileTreeFolder

value
string
name
string
icon?
any
disabled?
boolean
className?
string

FileTreeFile

value
string
name
string
icon?
any
disabled?
boolean
className?
string

FileTree

value?
string | null
defaultValue?
string | null
null
onValueChange?
((value: string) => void)
expandedIds?
{}
defaultExpandedIds?
{}
[]
onExpandedChange?
((expandedIds: {}) => void)
ariaLabel?
string
Files
indent?
number
18
className?
string
classNames?
FileTreeClassNames

Updated