Tree Like folder Structure

Hi Team,

I am developing a dashboard using streamlit. I want to display the products that are available in the form of a tree structure on the side bar. Is it possible to do it.

For example. These has to be collapsible as well

Product
a
  a1
  a2
b
  b1
  b2
1 Like

The only way I can think of @HariGan is to use two separate select boxes, where the first selects a, b etc. and based on that selection, you set up the second selectbox to have a1, a2 etc. Its similar to saying company and model, for example, as I understand it. I use this style in the dashboard that I’ve written.

Does that work for you?

Dinesh

Hi ddutt!

I am actually looking to have something like a folder structure. Because we are trying to replicate a specific UI/UX so. If there any possibility for that.

Thanks,
Hari

Hello @HariGan,

There is currently no specific widget to do what you want.

You have to rely either on some hacks using existing streamlit widgets (as suggested by @ddutt), or implement a custom component which does this.

In fact, I’m actually working on a component which implements a folder structure, but I don’t have any ETA yet.

4 Likes

Thanks @okld,

Once you implement it. Kindly put that out here so we will be able to utilize it.

Regards,
Hari G

1 Like

Hey @ddutt , have you any idea, how we can get users input and with user input add a select box, (in this matter tree like structure)?