Ipywidgets (WIP)

Hey :wave:

What if Streamlit supported ipywidgets natively? Even complex ones such as bqplot, pythreejs, ipyleaflet and some more

Well, that would be great, that would even be a real killer feature, but it’s not quite there unfortunately :sweat_smile: Embedding simple widgets was straightforward with this tutorial from ipywidgets documentation. But so far:

  • I can interact with widgets but I don’t retrieve any value to use in Streamlit
  • Embedding the aforementioned complex widgets need more work, especially to manage JS dependencies with those CORS issues and JS loaded from localhost:8501/ for some reason :cry:

I was even wondering if spawning an ipython kernel would be better to be as compatible as possible, but I’m not sure of that…

All of this is still exploratory, but here’s a screenshot showing how simple widget renders into Streamlit.

1 Like

Agreed, I think this would be a killer feature, but as you mention it’s not really clear how the best way to accomplish it might be.