Skip to content
NAVIGATION · FREE

TreeView

Hierarchies that are easy to browse by keyboard or mouse.

Hierarchies that are easy to browse. TreeView follows the standard tree pattern: arrow keys move and expand, Home and End jump, Enter or Space selects.

Why it helps

  • Keyboard friendly
  • Check boxes option
  • Loads children on demand

Where it fits

  • Folders
  • Categories
  • Organization charts
TreeView control in a RayCraft page

Example

<TreeView Items="SampleData.Folders" ChildrenSelector="@(f => f.Children)" ItemText="@(f => f.Name)"
          @bind-SelectedItem="_selected" Label="Folders" />
<p>Selected: @(_selected?.Name ?? "none") (use the arrow keys, Enter, Home and End)</p>

@code {
    private Folder? _selected;
}

A short fragment. Add @using RayCraft.Blazor.Components to your page and use an interactive render mode.

Included in RayCraft Free. Working examples are in the GitHub repository (MIT); it holds example and demo code, not the library code.

All controls ยท Documentation