Tree View
A hierarchical tree component for displaying nested data like file browsers.
File Browser
Tree view with folders and files.
- src
- components
- Button.jl
- Card.jl
- Suite.jl
- utils.jl
- test
- runtests.jl
- Project.toml
- README.md
With Selection
Tree view with a selected item.
- docs
- app.jl
- input.css
- src
- main.jl
Keyboard Interactions
| Key | Action |
|---|---|
| ↓ / ↑ | Move between visible items |
| → | Expand folder / move to first child |
| ← | Collapse folder / move to parent |
| Enter / Space | Select item / toggle folder |
| Home / End | Jump to first / last visible item |
Usage
julia
using Suite
TreeView(
TreeViewItem(label="src", is_folder=true, expanded=true,
TreeViewItem(label="main.jl"),
TreeViewItem(label="utils.jl"),
),
TreeViewItem(label="Project.toml"),
)API Reference
TreeView
| Prop | Type | Default | Description |
|---|---|---|---|
| children | Any | - | TreeViewItem elements |
| class | String | "" | Additional CSS classes |
TreeViewItem
| Prop | Type | Default | Description |
|---|---|---|---|
| label | String | "" | Display text |
| is_folder | Bool | auto | Whether this is a folder (auto-detected from children) |
| expanded | Bool | false | Whether folder is initially expanded |
| selected | Bool | false | Whether item is selected |
| disabled | Bool | false | Whether item is disabled |
| icon | Any | nothing | Custom icon (overrides default file/folder icon) |
| depth | Int | 0 | Nesting depth for indentation |
| class | String | "" | Additional CSS classes |