import streamlit as st from streamlit.components.v1 import html # Define your javascript my_js = """ alert("Hola mundo"); """ # Wrap the javascript as html code my_html = f"""
Test
""" # Execute your app st.title("Javascript example") st.components.v1.html(my_html, height=300) # Specify height for the HTML component