finds.dev

chenglou/react-treeview

Easy, light, flexible tree view made with React.

View on GitHub

★ 1,097JavaScriptupdated May 2025

// the take

A small React component that renders a collapsible tree node with a clickable arrow, a label, and nested children. It suits developers who need a file-browser-style tree in an existing React app and want a light dependency instead of a full tree widget.

- One component supports both controlled (`collapsed`) and uncontrolled (`defaultCollapsed`) state, so the parent can own the open/closed state when it needs to.

- The CSS is one short file with class hooks on each layer (`itemClassName`, `treeViewClassName`, `childrenClassName`), so restyling doesn't require forking the component.

- Extra props are passed through to the arrow element, so event handlers and data attributes work without extra wiring.

- Last push was May 2025 and the README's live demos point to a RawGit URL pinned to one commit. RawGit shut down years ago, so the demo link is dead and the only way to see the component in action is to build it locally.

- The React-facing surface is small and undocumented beyond the props list. Nothing in the README covers keyboard navigation or ARIA tree roles, and `onClick` fires only from the arrow, which makes the tree hard to operate without a mouse.

- Nothing in the listing suggests shipped TypeScript definitions, so TypeScript consumers would need to write their own declarations. Bower support and a checked-in `build/` directory also suggest the packaging hasn't been revisited in a while.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,097
Forks
154
Language
JavaScript
Last commit
29 May 2025

// nearby

If react-treeview isn't quite it.

All repos →