Skip to content

ContentJsonViewer ​

A JSON tree on nested details elements, with search, path and copy.

ts
import { ContentJsonViewer } from '@zairakai/vue-components/Content'

Usage ​

vue
<ContentJsonViewer />

Example ​

  • {3}
    • "Ada"
    • [2]
      • "en"
      • "fr"
    • {1}
      • "London"
vue
<template>
  <ContentJsonViewer
    :value="{ name: 'Ada', langs: ['en', 'fr'], address: { city: 'London' } }"
    :expanded="2"
  />
</template>

Props ​

NameTypeDefaultDescription
idstring
classstring
valuenullnull
expandednumber1How many levels are open at the start.
searchstring''Open and mark what contains this text.
labelstring'JSON'
copyablebooleantrue
copyLabelstring'Copy'
copiedLabelstring'Copied'

Events ​

NameDescription
select

See Theming for the class hooks and the data-* state of the components.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.