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.

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