DS0
Components

JsonViewer

A collapsible, syntax-colored JSON tree viewer with expand/collapse controls.

Overview

JsonViewer renders JSON data as an interactive, collapsible tree with syntax coloring. Users can expand/collapse nested objects and arrays, and copy values.

{
"categories":
[
0: "Layout",
1: "Forms",
2: "Data Display",
3: "Navigation",
4: "Feedback"
]
,
"components": 95,
"config":
{
"accessibility": ,
"responsive": true,
"theme": "dark"
}
,
"deprecated": null,
"isPublic": true,
"maintainers":
[
0: ,
1:
]
,
"name": "DS0",
"version": "1.0.0"
}

Usage

<JsonViewer
  data={{ name: 'DS0', version: '2.0', components: 95 }}
  defaultExpanded={2}
/>

API Reference

PropTypeDefaultDescription
dataunknownJSON data to display
defaultExpandednumber | boolean1Default expansion depth
copyablebooleantrueEnable value copying
theme'dark' | 'light''dark'Color scheme
ComponentWhen to Use Instead
CodeBlockStatic code display
TreeViewGeneric tree structure

On this page