finds.dev← search

// the find

chenglou/react-treeview

★ 1,097 · JavaScript · updated May 2025

Easy, light, flexible tree view made with React.

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.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →