Using Jupyter Lab Widgets in other contexts (outside Jupyter Lab)

Hi, I’m one of the engineers from the Python/Jupyter extension for VSCode.
Today we support IPyWidgets in VSCode majority of which is based on the sample provided here Embedding Jupyter Widgets in Other Contexts than the Notebook .

We had to implement a lot more code than that to support custom widgets (extensions) loaded from the nbextensions folder and the like. So far most of it works as expected.

However supporting Jupyter Lab Widgets is a bit more complicated as they pull in (require) Jupyter Lab (application) components.

Is there any documentation or guidance on adding support for these widgets (Jupter Lab Widgets outside Jupyter Lab).

Thanks

2 Likes

Can you give an example of a widget you are trying to support and what it is pulling in?

Sorry for the delay. I haven’t come across too many.
One example is vpython/vpython-jupyter: 3D visualization made easy (github.com). This doesn’t work in VS Code, as this extension pulls in Jupyter Lab UI dependencies.