Trees
Hierarchical data visualization components for representing nested structures like file systems, categories, or navigation menus.
Use this example to explore default behavior, customization points, and accessibility-friendly patterns in a real Blazor page.
Standard Tree
MgTreeContainerA flexible tree component that supports infinite nesting, custom icons, and optional checkboxes for multi-selection.
API Reference
MgTreeContainer
| Property | Type | Default | Description |
|---|---|---|---|
| ShowCheckBoxes | bool | false | Whether to show checkboxes for selection. |
| ItemSelected | EventCallback<MgTreeItem> | - | Triggered when an item is selected. |
| CheckChanged | EventCallback<List<MgTreeItem>> | - | Triggered when checkbox states change. |
MgTreeItem
| Property | Type | Default | Description |
|---|---|---|---|
| DisplayText | string | "" | The text to display for the item. |
| IconName | string | null | Optional icon for the item. |