FIle Tree
Installation
Install Dependencies
Copy and Paste the component
@/components/reframe-ui/file-tree.tsx
Usage
Props
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| elements | FileTreeViewElement[] | - | No | Array of tree view elements with id, name, and optional children |
| initialSelectedId | string | - | No | ID of the initially selected item |
| initialExpandedItems | string[] | [] | No | Array of item IDs to be initially expanded |
| indicator | boolean | No | Whether to show the vertical indicator line for nested items | |
| openIcon | React.ReactNode | - | No | Custom icon for open folders |
| closeIcon | React.ReactNode | - | No | Custom icon for closed folders |
| dir | "rtl" | "ltr" | - | No | Direction of the tree view (right-to-left or left-to-right) |
| className | string | - | No | Additional CSS classes for styling |
© Copyright 2025. All rights reserved.Built by @thommysart