JsonView
API reference and demos for JsonView.
Import
Section titled “Import”import { JsonView } from "@flanksource/clicky-ui/data";The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.
| Prop | Type | Default | Description |
|---|---|---|---|
data |
unknown |
— | Parsed JSON-like value. Strings remain literal values. |
defaultOpenDepth |
number |
— | Depth that starts expanded by default. |
density |
enum |
— | Override the inherited application density for this viewer. |
depth |
number |
— | Current nesting depth; callers usually leave this unset. |
format |
enum |
yaml |
YAML is the default; JSON retains braces and quoted strings. |
inputFormat |
enum |
— | Source encoding. This is independent of the YAML/JSON display format. |
name |
string |
— | Property name displayed before the value. |
source |
string |
— | Raw JSON or NDJSON, including input interrupted at EOF. |