Dash component/object display and architecture

I’m attempting to build an object viewer, currently I receive a nested python dictionary mainly with keys throughout the tree and the root contains 2 k/v pairs that has some basic text. I’m attempting to visualize this nested object by building out a viewer similar to the dbc collapse but will most likely end up doing the styling myself. What I’m trying to work out is the best way to develop my nested object visually in dash, since I want to obj to be collapsed and only display the nested objects when a button is clicked would using pattern matching be the best way to develop this or something else. I have the entire object right after I make the call to the server so the data generated isnt necessary dynamic, but user’s actions will need to open up portions of the nested object. Any advice and tips would be greatly appreciated!

For collapsing, you could also do something with html.Details and html.Summary. Build it out recursively for nested objects. This way it’s all done clientside and natively with html, no callbacks necessary

1 Like

Wow that’s perfect! Thank you, love Dash btw incredibly powerful tool. I have yet to build out my own custom React components but excited to dig into that and try!