128
A JSON tree you can actually read: types in colour, key and item counts, inline previews of folded branches, copy-any-path, and a search that opens the tree down to every match and steps through them.
akajson·json viewer·tree view
Run this in any project set up for the shadcn CLI. It copies the JSON Explorer source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/json-explorer.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { JsonExplorer } from "@/components/json-explorer";
export default function Page() {
return <JsonExplorer />;
}A free React component in the Dev Tools collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the JSON Explorer source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| datarequired | JsonValue | — |
| rootName | string | "data" |
| defaultDepth | number | 1 |
| defaultExpanded | string[] | [] |
| title | string | — |
| onCopyPath | (path: string) => void | — |
| className | string | — |