# TreeView Documentation ## Installation ```bash jsrepo add ui/tree-view ``` ## Components ### Root The root component of the tree view. #### Props | Prop | Type | Default Value | Required | Bindable | Description | |------|------|--------------|----------|----------|-------------| ### Folder A folder node in the tree view. Can contain children and be expanded/collapsed. #### Props | Prop | Type | Default Value | Required | Bindable | Description | |------|------|--------------|----------|----------|-------------| | name | string | - | true | false | The name of the folder. | | open | boolean | false | false | true | Whether the folder is open (expanded). | | class | string | - | false | false | Additional classes to apply to the folder. | | icon | Snippet<[{ name: string; open: boolean }]> | - | false | false | Custom icon render function for the folder. Receives { name, open }. | | children | Snippet | - | false | false | The content of the folder (usually TreeView.File or TreeView.Folder). | ### File A file node in the tree view. Renders as a button. #### Props | Prop | Type | Default Value | Required | Bindable | Description | |------|------|--------------|----------|----------|-------------| | name | string | - | true | false | The name of the file. | | icon | Snippet<[{ name: string }]> | - | false | false | Custom icon render function for the file. Receives { name }. | | children | Snippet | - | false | false | The content of the file (usually TreeView.File or TreeView.Folder). |