Add icon to st.dialog
Checklist
- [x] I have searched the existing issues for similar feature requests.
- [x] I added a descriptive title and summary to this issue.
Summary
Hi :-),
I think it would be nice to have the possibility to attach an icon to a st.dialog in the front of the dialog title ... just an idea, nothing urgent.
Best Regards
Why?
No response
How?
No response
Additional Context
No response
To help Streamlit prioritize this feature, react with a 👍 (thumbs up emoji) to the initial post.
Your vote helps us identify which enhancements matter most to our users.
@alex-bork Thanks for the suggestion :) I agree that this seems like a good idea. In the meantime, as a workaround you can use markdown as part of the title, which allows you to use material icons within the title:
@st.dialog(":material/chart_data: Chart Explorer")
Hi! @lukasmasuch I’d love to contribute to this feature. I was thinking to implement dialog icon support using a simple string + image approach (emoji, URL, or local image path). That’s the model I have in mind, but please let me know if you'd prefer a different direction.
@KaranPradhan266 I think we only want to keep this consistent with other icon parameters, which only support material icons and emojis:
This is using the shared DynamicIcon.tsx component.
@lukasmasuch Understood. I’ll begin working on this now.
@lukasmasuch @alex-bork Let me know if this looks good to you?
https://github.com/user-attachments/assets/d88ee924-9ab2-4b2b-9fdb-bdd5037bfe75
@lukasmasuch @alex-bork Let me know if this looks good to you?
Screen.Recording.2025-12-06.at.1.11.48.PM.mov
Yes, looks great! :-) Best Regards
Closing as implemented in PR https://github.com/streamlit/streamlit/pull/13244 🎉