Skip to content

zk-json-viewer ​

A JSON value as nested, expandable lists, with a copy button.

Props ​

PropTypeDefaultDescription
valuemixednullArray, object or scalar
expandedint1Number of levels open at first
labelstring'JSON'Accessible name
copyablebooltrueShows the copy button
copyLabelstring'Copy'Text of the button
idstring|nullnullIdentifier
classstring|nullnullCSS class(es) merged onto the root element

Undeclared attributes forward to the root element.

Branches are <details>, so they open with no script; each node has data-type. Needs the script copy of zk-scripts: the component asks for it by itself. The search of the Vue component is not ported.

Examples ​

Payload ​

blade
<x-zk-json-viewer :value="$payload" :expanded="2" />

Documentation of 3.2.7 , built from 7415dae on 3.2.7 by pipeline #3081600448 on 2026-11-17.