Ability to integrate javascript?

I would like to integrate an interactive viewer for some of my data (DNA sequences).

Several people have made these viewers, mostly in javascript. Is there any possible way to integrate, say components of this viewer (https://github.com/Lattice-Automation/seqviz) into a streamlit app? Would something along the lines of st.markdown(myMarkdown, unsafe_allow_html = True) suffice? For reference, I am an intermediate python programmer with no javascript experience (though willing to get my hands dirty).

1 Like

I tried inserting script tags in markdown, along with some html, but everything in the script got ignored. Seems to me they don’t allow JS, probably for security reasons. wish there was some reasonable workaround though

1 Like

Hi @mmcguffi— and welcome to the forum! :wave:

Unfortunately, right now JavaScript integration is not supported in Streamlit, but we already have a feature request based on our users’ issues: https://github.com/streamlit/streamlit/issues/969

Please, feel free to follow that issue for up-to-date information and write any additional details to that request. And thanks for using Streamlit!

2 Likes