feat: Add displayCompact options and new icon styles
This PR introduces new display options to enhance the visualization of nested data structures and provides additional icon style choices for a more customizable user experience.
Changes
- Added
displayCompactoption that hides ':', '{', and '[' symbols for non-leaf nodes, creating a cleaner visualization of nested structures - Implemented new icon style options: Added
chevronstyle alongside the existingtrianglestyle
https://github.com/user-attachments/assets/a7d8b42c-07fb-46ff-9efe-fa9f3bbc6eca
I've updated the readme and demo as well. Expecting to your feedback. Thank you.
Fixed #68
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| react-json-view | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Mar 16, 2025 1:23pm |
It's nice!
What could be more interesting is, rather than having a list of fixed icons, to provide a way to fully customize the icon.
If the icon could be specified as a function, then it would be easier to use any icon rendered by the function, following this pattern: https://reactpatterns.com/#render-prop
What do you think?
ping @chacha912 in case you missed the notification 🙂