Split main window streamlit

Hi community,
i want use streamlit for design simple UIUX for my chatPDF web, I cant find how to split main window to 2 side, anyone can help me ?

Hi @Tra_Nguy_n_Dinh

You can also use a sidebar to insert elements there as well.

You can do this either with:

with st.sidebar:
   # your code goes here


st.sidebar.write(β€˜Hello world!’)

Hope this helps

i want slidebar contain another content, I need split main window , one side for showing pdf file and one side for chat

my idea seem like that
ChatPDF - Chat with any PDF!

For splitting contents in the main panel, have you tried using st.columns()?

Something like:

cols = st.columns(2)
with cols[0]:
   # Code for column 1

with cols[1]:
   # Code for column 2

Hope this helps!

yes, but it not seem like what i want

Hi @Tra_Nguy_n_Dinh

Could you draw a mock-up of what you have in mind using Excalidraw, thanks!