Expand description
Tree widget for hierarchical display.
Renders a tree of labeled nodes with configurable guide characters and styles, suitable for file trees or structured views.
§Example
use ftui_widgets::tree::{Tree, TreeNode, TreeGuides};
let tree = Tree::new(TreeNode::new("root")
.child(TreeNode::new("src")
.child(TreeNode::new("main.rs"))
.child(TreeNode::new("lib.rs")))
.child(TreeNode::new("Cargo.toml")));
assert_eq!(tree.root().label(), "root");
assert_eq!(tree.root().children().len(), 2);Structs§
- Tree
- Tree widget for rendering hierarchical data.
- Tree
Node - A node in the tree hierarchy.
- Tree
Persist State - Persistable state for a
Treewidget.
Enums§
- Tree
Guides - Guide character styles for tree rendering.