# [Usage](../../../usage.md) > [Components](../basics.md) > [Visuals](../basics.md) > TreeView

Collapsible hierarchical node for nested content. Use it for trees, nested categories or expandable details where each level can hold its own `schema`; use [Card](card.md) for a flat container and [Tabs](tabs.md) for peer sections instead of parent/child levels.

```php
{!!
  \KFramework\Components\Visual\TreeView::make('Project')
    ->setSchema([
        \KFramework\Components\Visual\TreeView::make('Phase 1')
            ->setSchema([
                \KFramework\Components\Forms\Input::make('task')->setLabel('Task'),
            ]),
        'Simple text child',
    ])
!!}
```

**End-to-end example:** expandable category tree, first level open by default.
```php
// Blade:
{!!
  \KFramework\Components\Visual\TreeView::make('Categories')
    ->setOpen()
    ->setSchema([
        \KFramework\Components\Visual\TreeView::make('Hardware')
            ->setSchema([
                \KFramework\Components\Visual\Button::make('View stock')->setUrl('/stock/hardware'),
            ]),
        \KFramework\Components\Visual\TreeView::make('Software')
            ->setSchema(['Licenses, renewals, seats']),
    ])
!!}

// Controller:
use KFramework\Components\Visual\TreeView;

$tree = TreeView::make('Categories')
    ->setOpen()
    ->setSchema([]);

return view('categories.index', compact('tree'));
```

---
## Usage

- Blade:
```php
{!! \KFramework\Components\Visual\TreeView::make() !!}
```
- Controller:
```php
TreeView::make()
```

---
## Standard attributes

- `uuid`
- `id`
- `classes`
- `extraAttributes`
- `name` | `label`
  -  Setting the name will set the title shown in the opener row, `name` overrides `label`.
- `content` — static HTML/text body; ignored when `schema` is set.
- `schema` — array of nested components; each entry can be another `TreeView` for deeper levels.
- `columns`
- `columnSpan`
- `transparent`
- `lazyLoadSchema`

See their usage and description [here](../basics.md).

---
## Component-specific attributes

### `open` | `->setOpen()`

Starts the node expanded instead of collapsed. When omitted the node starts closed and the user expands it with the chevron.

| Types  | Default |
|--------|---------|
| `bool` | `false` |

## See also
- [Components basics](../basics.md)
- [Card](card.md), [Tabs](tabs.md), [Fieldset](fieldset.md)
- [schema](../shared_attributes/schema.md), [lazyLoadSchema](../shared_attributes/lazy_load_schema.md), [transparent](../shared_attributes/transparent.md)
