TreeView
Display hierarchical data with expandable/collapsible nodes and selection support.
Example
src
components
Button.tsx
Card.tsx
hooks
useTheme.ts
index.ts
package.json
README.md
Features
- ✅ Expand/collapse nodes
- ✅ Single or multiple selection
- ✅ Checkbox mode
- ✅ Custom node icons
- ✅ Keyboard navigation
- ✅ Controlled expand/select state
Props
nodes- TreeNode[] data structureselectionMode- 'none' | 'single' | 'multiple'showCheckbox- Show selection checkboxesexpandAll- Expand all nodes initiallyexpandedIds- Controlled expanded nodesselectedIds- Controlled selected nodessize- 'sm' | 'md' | 'lg'