JSON Viewer
Collapsible JSON tree with syntax colors, key counts, expand/collapse all, copy value or path and long-string expansion.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
JsonViewerProps
Also accepts all props of Omit<React.ComponentProps<"div">, "children">
| Prop | Type | Default | Description |
|---|---|---|---|
| data* required | unknown | — | — |
| title | string | — | Header title |
| defaultExpandedDepth | number | — | Levels expanded on first render (1 = only the root) |
| maxStringLength | number | — | Strings longer than this are truncated until expanded |
Install
$ npx shadcn@latest add https://chromotion.dev/r/json-viewer.json