How to change logout button?

I’m using streamlit-authenticator and I have this piece of code which adds a Logout button to the main body of the screen.

authenticator.logout("Logout", "main")

How do I:

  1. Move it to the top right hand corner of the screen (i’ve removed the menu icon)?

  2. Replace the button with the text in it Logout, and replace it with an icon?

Thank you

2 Likes

+1 for this support.

In my case, I choose to draw my own logout button. But i need this on the top-right. How do I do that?

Hi @chai86

You could use st.columns to create multiple columns and in the last column you can embed your button there so that it is located to the right portion of the app.

Something like the following:

cols = st.columns(3)

# the 3rd column
with cols[2]:
   authenticator.logout("Logout", "main")

Hope this helps!

1 Like

Really need this. I am developing a web-app in a language other than english and I need the button to read in my native language. Can’t do that currently.