Skip to main content

Tree

Function Tree 

Source
pub fn Tree(props: TreeProps) -> Element
Expand description

Tree component for hierarchical data

This component renders a tree structure with optional expand/collapse, checkboxes, and node highlighting.

§Example

use dioxus_element_plug::components::tree::{Tree, TreeNodeData};

let data = vec![
    TreeNodeData::new("Level 1")
        .child(TreeNodeData::new("Level 2-1"))
        .child(TreeNodeData::new("Level 2-2")),
];

rsx! {
    Tree {
        data: data,
        default_expand_all: true,
        highlight_current: true,
    }
}