import streamlit as st from streamlit.components.v1 import html # Define your javascript my_js = """ alert("Hola mundo"); """ # Wrapt the javascript as html code my_html = f"" # Execute your app st.title("Javascript example") html(my_html)