Tree
stableA hierarchical list, like a file explorer.
Basic usage
- src
- index.ts
- app.tsx
Examples
Multi-level file tree
Deeply nested tree mimicking a project directory structure.
- src
- components
- Button.tsx
- Dialog.tsx
- index.ts
Large file tree
Tree handles nested groups, expanded state and keyboard navigation.
- src
- app.tsx
- index.ts
- theme.ts
- docs
- components.mdx
- migration.mdx
- tests
Features
- Expand / collapse.
- Keyboard navigation.
Installation
bash
pnpm dlx structyl add treeAPI Reference
Tree API reference
Full props, types, defaults, and all 4 parts.