Skip to content

Recursive Data Viewer ​

ue-recursive-data-viewer renders arbitrary JSON data — objects, arrays, and primitives — as an interactive, collapsible tree. It is the equivalent of a browser DevTools JSON inspector for use inside views.

Usage ​

html
<ue-recursive-data-viewer :data="responsePayload" />

Props ​

PropTypeDefaultDescription
dataArray|Object|String|Number|BooleanrequiredThe value to render
allArrayItemsClosedBooleanfalseCollapse all array items on initial render
allArrayItemsOpenBooleanfalseExpand all array items on initial render
allObjectsClosedBooleanfalseCollapse all objects on initial render
allObjectsOpenBooleanfalseExpand all objects on initial render
objectDepthNumber0Current recursion depth (set automatically by child instances)
arrayIndexNumbernullIndex in a parent array (set automatically)
objectTitleStringnullOptional label shown above the object (internal use)

Behaviour ​

  • Arrays are rendered with an item count badge. Each element can be expanded or collapsed independently.
  • Objects render as a collapsible table of key/value pairs. The first object at depth 0 is expanded by default.
  • Primitives (string, number, boolean) are rendered as plain text inline.
  • Object keys are styled in a monospace purple font, matching common JSON viewer conventions.
  • The component is fully recursive — nested objects and arrays are rendered by child ue-recursive-data-viewer instances.