hey guys, my app is already deployed.
the client asked me a multipages app (50 pages), and now he wants a search bar in the sidebar (Above the pages names) to filter the page by name, but I really don’t have idea on how to do it. Is it even possible? Can you guys help me?
Im uploading a print, so you guys can know what im talking about
Hey @fernandococco,
Unfortunately, this isn’t a built-in Streamlit feature. However, there is a streamlit-searchbox custom component that you could use to implement the search bar piece.
1 Like
Hi fernandococco, i suggest you take a look into Streamlit Super App package i just released:
To use it you will need to change your pages folder structure:
from:
pages/page_1.py
pages/page_2.py
to
pages/__init__.py
pages/page_1/__init__.py
pages/page_2/__init__.py
and inside “pages/__init__.py” you just put these settings:
INDEX = False # Disables the page index and go straight to first page
SEARCH = True # enable searchbox
your pages must have a main function, for example:
pages/page_1/__init__.py
import streamlit as st
def main():
st.write("hello world")
and in your main app file you call
import streamlit_superapp as app
app.run()