bloxa

Tree View

FREE

File-style tree with expandable folders, selection, guide lines and full keyboard support.

Installation

Terminal
npx @bloxa/cli add tree-view
# or: npx shadcn@latest add @bloxa/tree-view

Examples

Project files

Keyboard: arrows, Home/End, Enter, * expands siblings.

  • components
    • ui
      • button.tsx
      • chart.tsx
      • dialog.tsx
    • site-header.tsx
  • package.json1 kB
  • .env

API reference

Every component also accepts the props of the element it renders.

TreeView

PropTypeDefaultDescription
data{ id, label, icon?, meta?, children?, disabled? }[]—Nodes.
selected / onSelectstring / (node) => void—Selected node.
expanded / defaultExpanded / onExpandedChangestring[]—Open branches.
guidesbooleantrueGuide lines.
folderIcon / fileIcon(open) => ReactNode / ReactNode—Default icons.