Tagging to filter in streamlit

Hi Streamlit Community,

I am learning and building my first streamlit app - my portfolio.
I am listing out all the personal projects (image and description side by side as two columns), and I want to list all the tags at the top (All, NLP, CV, Pytorch, Pandas etc will be the tags). When user clicks on one of these tags say CV, only the projects related to CV should appear. By default, ALL tag will be selected and all the projects will be listed. Is there a way to implement this tagging feature?

The closest feature I could find was a drop down multi select. But I do not want the user to click on drop down and scroll to see all the available tags.

Thanks,
Amulya

Hi @Amulya , you could probably repurpose tags to suit your needs.

Cheers

Hi @Shawn_Pereira, Thank you, but that’s not quite what I am looking for.
I am looking for functionality like the categories in the left in this streamlit gallery page - Gallery • Streamlit
I would prefer that to be horizontal in the center instead of sidebar.
When user clicks on NLP, only nlp related apps are listed. How do I implement this functionality.
Is session state required?

Thanks,
Amulya

Hi Amulya,
I am looking for something similar. Were you able to figure out?

Hi @singhankit16 , check if any of the following libraries help:

You will however need to write your filtering code in python after accessing the user click.

Cheers

1 Like

Hi Shawn,

Thank you for resource links. I’ll look into it.

Hi singhankit16,
I did not find any readily available feature. I ended up changing the design. Do share if you find something.

1 Like

Would the new st.tabs feature work for this? st.tabs - Streamlit Docs

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.