Skip to Content

Json Tree

Tree component designed for showing JSON data.

Examples

Theme

This component uses the following default theme:

  • root{}(2 keys)
      Show all

Learn more about how to customize in the Theme documentation.

API

Tree

NameTypeDefault
data{ [key: string]: any; }

The data to be rendered as a JSON tree.

showAllboolean

If true, all nodes in the JSON tree will be expanded by default.

false
showAllLimitnumber

The limit for the number of nodes to show when showAll is false.

10
showCountboolean

If true, the count of child nodes will be shown next to each node.

true
showEmptyboolean

If true, empty nodes will be shown in the JSON tree.

true
ellipsisTextboolean

If true, long text in nodes will be truncated and replaced with an ellipsis.

true
ellipsisTextLengthnumber

The maximum length of text in a node before it is truncated and replaced with an ellipsis.

150
expandDepthnumber

The depth at which the JSON tree nodes should be expanded by default.

2
rootboolean

If true, the JSON tree will be rendered with a root node.

true
classNamestring

The CSS class name to be applied to the JSON tree.

TreeNode

NameTypeDefault
dataJsonTreeData

The data to be rendered as a JSON tree.

classNamestring

The CSS class name to be applied to the JSON tree node.

showCountboolean

If true, the count of child nodes will be shown next to each node.

showEmptyboolean

If true, empty nodes will be shown in the JSON tree.

depthnumber

The depth of the JSON tree node. This is typically used for indentation purposes.

showAllboolean

If true, all nodes in the JSON tree will be expanded by default.

showAllLimitnumber

The limit for the number of nodes to show when showAll is false.

expandDepthnumber

The depth at which the JSON tree nodes should be expanded by default.

themeJsonTreeTheme

Theme for the Json Tree

ellipsisTextboolean

If true, long text in nodes will be truncated and replaced with an ellipsis.

ellipsisTextLengthnumber

The maximum length of text in a node before it is truncated and replaced with an ellipsis.

Last updated on