Share from 0:00
0:00
/

Show an API response as a JSON tree

The first Mantine Extensions tutorial: mantine-json-tree, from install to search, paths and copy, in 75 seconds.

I’ve started a series of short narrated tutorials for Mantine Extensions, my open-source React components for Mantine: one task each, with the real component on screen. The first is about mantine-json-tree, the most downloaded of them.

A JSON response printed as text is hard to read. In 75 seconds:

  • install it, and import its styles once

  • pass it an API response; it starts closed, and the arrows open each node

  • add defaultExpanded to open two levels on load (that’s maxDepth, 2 by default)

  • withSearch keeps only the branches that match

  • showPathOnHover shows the full path of any row

  • withCopyToClipboard copies any node

Docs and live demos: gfazioli.github.io/mantine-json-tree
GitHub: gfazioli/mantine-json-tree
On YouTube, with the next ones: Mantine Extensions Tutorials

Which component should get the next tutorial? Reply and tell me.

Discussion about this video

User's avatar

Ready for more?