Description
JSON Tree Viewer is a React component that shows JSON as a collapsible, syntax-highlighted tree. You can expand and collapse nodes, turn indent guides on or off, and collapse a node by default so large objects open compact. It includes copy support and dark mode, and the demo page has a theme toggle with a keyboard shortcut. The showcase covers a simple user record, nested configuration with database and cache settings, and a package file. The component is built with shadcn/ui, Base UI and Tailwind CSS v4. It is meant to be copied into your project rather than imported from a package, so you can change the styling. You install it with the shadcn CLI by pointing it at the json-view registry file on the site. The site also links to the GitHub repository.…
Highlights
- Collapsible, syntax-highlighted JSON tree
- Copy support and optional indent guides
- Nodes can start collapsed for large objects
- Built with shadcn/ui, Base UI and Tailwind v4
- Copy-paste install with the shadcn CLI
Ratings & Reviews
No ratings yet
Be the first to rate json-view-cn.
People also visit
json-view-cn FAQ
What is JSON Tree Viewer?
A React component that shows JSON as a collapsible, syntax-highlighted tree. It is built with shadcn/ui, Base UI and Tailwind CSS v4.
How do I install it?
Run npx shadcn@latest add https://json-view-cn.vercel.app/r/json-view.json. The source is copied into your project, where you can edit it.
Does it support dark mode?
Yes. The demo page shows dark mode, and it has a theme toggle you can try.
Can nodes start collapsed?
Yes. The site shows a collapsed-by-default example, as well as a version with no indent guides.
Can users copy the data?
Yes. The viewer has copy support, which the demo page shows.
What are the best json-view-cn alternatives?
Popular alternatives to json-view-cn include @uiw/react-json-view, react18-json-view and react-json-viewer-cool. See all json-view-cn alternatives













