# Tree View
> An expandable tree of rows, with selection.
Source: https://native.shellui.dev/docs/components/navigation/tree-view
## Installation
```bash
shellui-native add tree-view
```
**Platforms:** MAUI ยท Avalonia. Also installs `icon`, `element-extensions`.
## Usage
### Basic
**MAUI**
```xml
```
**Avalonia**
```xml
```
[Live preview](https://native.shellui.dev/preview/index.html?c=tree-view-basic)
## MAUI and Avalonia
Rows are tab stops on both platforms. On Avalonia, Right also expands a row and Left collapses it.
## API
### TreeView
XAML children go to `Items`.
| Property | Type | Default | Description |
|---|---|---|---|
| `SelectedValue` | `string` | โ | The selected item's Value (its Text when no Value is set). |
| Event | Arguments | Description |
|---|---|---|
| `SelectedValueChanged` | `string?` | User input only: setting SelectedValue from code or a binding doesn't raise it. |
### TreeViewItem
XAML children go to `Items`.
| Property | Type | Default | Description |
|---|---|---|---|
| `Text` | `string` | โ | Text shown by the component. |
| `Value` | `string` | โ | Identifies the item; reported as the tree's `SelectedValue`. |
| `Icon` | `IconName` | `None` | Lucide icon from `IconName`; `None` for no icon. |
| `IsExpanded` | `bool` | `false` | Whether the item's children are shown. |