Display a success message.

Function signature[source]

st.success(body, *, icon=None)


body (str)

The success text to display.

icon (str or None)

An optional, keyword-only argument that specifies an emoji to use as the icon for the alert. Shortcodes are not allowed, please use a single character instead. E.g. "🚨", "🔥", "🤖", etc. Defaults to None, which means no icon is displayed.


import streamlit as st

st.success('This is a success message!', icon="✅")

Still have questions?

Our forums are full of helpful information and Streamlit experts.

Was this page helpful?

editEdit this page on GitHub