Does Streamlit support Javascript now

I just want to add the following javascript:

require.config({
  paths: {
      d3: '//cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min',
      jquery: '//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min',
  }
});

Seems like I’m not able to do so using st.write at the moment

Hi @Allan_Jie, welcome to the forums.

This is still not natively possible at the time (see GH issue).

BUT Streamlit Custom Components are coming soon (by end of H1 if all goes well) and it will give you the ability to load your own HTML/JS into Streamlit, so you will be able to build your own D3 graphs using data in Streamlit :wink: (I’ve done the exercise in the beta…).

Fanilo

2 Likes