bit Bheadless

Tree View

A hierarchical list with expand / collapse, single, multiple and checkbox selection, lazy loading and typeahead.

Implementation: CSS Tailwind

File explorer

WAI-ARIA Tree View. Up / Down move, Right / Left expand, enter, collapse or go to the parent, Home / End jump, * expands siblings, Enter or double click fires OnItemActivate, typing jumps by Label. Each <li> wraps its children, so state is styled on the tree root with [&_[aria-selected=true]>div]: — the >div keeps a selected folder from tinting its children.

  • 📂 src
    • 📂 components
      • 📄 Button.razor
      • 📄 Tree.razor
    • 📄 Program.cs
  • 🔒 secrets.json locked
  • 📄 README.md

Selected: src/components/Tree.razor · Last activated: —

Data-driven (recursive)

A recursive RenderFragment<Node> renders every level; items compute their own depth. @bind-ExpandedValues makes expansion controlled.

  • Components2
    • Collections3
      • Listbox
      • Tree View
      • Grid

Selected: tree · Expanded: 2

Multiple selection

SelectionMode="BitBhTreeSelectionMode.Multiple" + @bind-SelectedValues. Ctrl / ⌘ + click toggles, Shift + click selects a range; Space toggles, Shift + Up / Down extends, Ctrl + A selects all.

  • 📥 Inbox 3
    • 📁 Work
    • 📁 Personal
    • 📁 Receipts
  • 🗂️ Projects 3
    • 📁 Apollo
    • 📁 Gemini
    • 📁 Mercury

0 selected: —

Hierarchical checkboxes

Checkboxes="true": checking a parent checks its descendants; partly checked parents are aria-checked="mixed". The Template's Checked (true / false / null = mixed) is mirrored onto the box and styled with data-[checked=mixed]:.

  • Desktop app
    • Core runtime
    • Spell checker
    • Themes
      • Light
      • Dark
      • High contrast
  • Offline documentation

Installing: Core runtime, Light, Dark

Lazy loading

HasChildren="true" + LoadChildren fetch a folder's children the first time it expands. While loading the item is aria-busy="true" and the Template reports IsLoading.

An unhandled error has occurred. Reload 🗙