Skip to main content
The JSON component displays JSON data with syntax highlighting and collapsible structure.

Basic usage

Constructor

str | dict | list | Callable | None
default:"None"
Default JSON data as dict, list, or JSON string
bool
default:"False"
If True, all JSON nodes expanded by default
bool
default:"False"
Whether to show numerical indices for list elements
int | str | None
default:"None"
Component height with scrolling if needed
list[Literal['copy'] | Button] | None
default:"None"
Buttons to show. Default is ["copy"]

Events

  • change - Triggered when JSON data changes

Example