← ui-lab

Tree

A tree view with hierarchical keyboard navigation. Arrow Up/Down move through the visible items; ArrowRight expands a parent then steps into its first child; ArrowLeft collapses or steps out to the parent. Each item reports its depth (aria-level) and expansion state.

Preview

  • Documents
    • Report.pdf

Installation

npx shadcn@latest add https://ui.publictheta.com/r/tree.json

Conformance

This component conforms to the @publictheta/ui-spec tree specification. Run the suite against any implementation with pnpm conformance.