Creating Modern, Reactive Jupyter Widgets with Svelte

Hello all!

I love the things that can be done with custon Jupyter Widgets, but I found it difficult to use the current API to create more complex interfaces.

To make it a bit easier I created a new cookiecutter that uses Svelte (a frontend library similar to React and Vue but I personally think easier to learn) to write the frontend: widget-svelte-cookiecutter . It’s still early, but it essentially syncs the backend Traitlets as simple state variables (“stores”) in the Svelte app, which you can use reactively to create modern frontend interfaces.

I would love to hear if ya’ll have any thoughts, and if you try it out let me know what works or doesn’t!



Quick update, I wrote a short blog post walking through an example Svelte widget and how to add new variables and Traitlets: