react-json-view icon indicating copy to clipboard operation
react-json-view copied to clipboard

feat: Add displayCompact options and new icon styles

Open chacha912 opened this issue 10 months ago • 3 comments

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 displayCompact option that hides ':', '{', and '[' symbols for non-leaf nodes, creating a cleaner visualization of nested structures
  • Implemented new icon style options: Added chevron style alongside the existing triangle style

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

chacha912 avatar Mar 16 '25 13:03 chacha912

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

vercel[bot] avatar Mar 16 '25 13:03 vercel[bot]

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?

Kikobeats avatar Mar 19 '25 00:03 Kikobeats

ping @chacha912 in case you missed the notification 🙂

Kikobeats avatar May 16 '25 17:05 Kikobeats