Can you change were a success message appears?

Is there any way to change where a success message appears after clicking a button? Currently the success message appears at the top of the page. I would like to choose for it to appear somewhere else. Is this possible? I have provided some example code below to illustrate what I am talking about.

import streamlit as st

def show_success():


st.button('Click Me', on_click=show_success, type='primary')
1 Like

Hi @RustyPie, I donโ€™t think it is possible to get โ€œpreciseโ€ placement. Broadly, you will have to use columns / containers on your page and direct that output (st.success) into that column / container.


1 Like

You could use st.toast for that.

1 Like

Oh wow this is really cool! Thanks for sharing @CarlosSerrano

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