Tree View

A hierarchical tree component for displaying nested data like file browsers.

File Browser

Tree view with folders and files.

  • src
    • Suite.jl
    • utils.jl
  • Project.toml
  • README.md

With Selection

Tree view with a selected item.

  • docs
    • app.jl
    • input.css

Keyboard Interactions

KeyAction
↓ / ↑Move between visible items
Expand folder / move to first child
Collapse folder / move to parent
Enter / SpaceSelect item / toggle folder
Home / EndJump 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

PropTypeDefaultDescription
childrenAny-TreeViewItem elements
classString""Additional CSS classes

TreeViewItem

PropTypeDefaultDescription
labelString""Display text
is_folderBoolautoWhether this is a folder (auto-detected from children)
expandedBoolfalseWhether folder is initially expanded
selectedBoolfalseWhether item is selected
disabledBoolfalseWhether item is disabled
iconAnynothingCustom icon (overrides default file/folder icon)
depthInt0Nesting depth for indentation
classString""Additional CSS classes