# Code JSON Viewer

Inspect the payload of a webhook or an API response.

- id: `code-json-viewer`
- Page: https://agentic-ui-kit.com/components/code-json-viewer
- Live preview: https://agentic-ui-kit.com/live/component/code-json-viewer

## Install

```bash
agentic-ui add code-json-viewer
npx shadcn@4.17.0 add @agentic-ui/code-json-viewer
```

## Metadata

- **Level:** block
- **Category:** block
- **Installable in:** Radix UI (registry variant new-york), Base UI (registry variant base-vega)
- **Capabilities:** collapsible-tree, copy-path, expand-collapse-all, type-aware-syntax-colors, keyboard-tree-navigation, empty-state, error-state
- **Intents:** explore-detail, audit-trail
- **Suits domains:** devtools, saas, analytics, operations
- **Interaction:** expand-collapse, copy-path, keyboard-navigation
- **Screen role:** detail
- **Density:** compact
- **Dark mode:** yes
- **Use it for:** inspect the payload of a webhook or an API response, review the effective configuration of a deployment, explore the state diff of an event in an audit log
- **Avoid when:** JSON editing (use an editor with per-field validation), documents with thousands of nodes without prior virtualization
- **Preserve when adapting:** tree-disclosure-model, json-path-semantics, keyboard-interaction-model
- **Replace when adapting:** domain-payload, root-label, value-formatting
- **Adaptation effort:** low
- **Coupling:** low
- **Quality score:** 9.2/10
- **Quality breakdown:** visual 9/10, responsive 9/10, accessibility 9/10, code 9/10
- **Uses primitives:** button, badge, scroll-area
- **npm dependencies:** lucide-react
- **Motion:** profile subtle, library css, reduced-motion fallback yes
- **npm dependencies (registry):** lucide-react@0.577.0
- **Registry dependencies:** lib-primitives
