jupyter-vue is the JavaScript/TypeScript frontend component of the ipyvue Python library, providing a foundation for building interactive Jupyter widgets using Vue.js. It enables developers to integrate reactive Vue components directly into Jupyter notebooks and JupyterLab environments. The library is actively maintained, currently at version 1.12.0, with regular minor releases addressing bug fixes and introducing new features. Its key differentiator is simplifying the creation of complex, interactive frontend components within Jupyter by leveraging the Vue.js framework for reactivity and templating, abstracting away much of the boilerplate typically associated with traditional Jupyter widget development. This allows for more dynamic and rich user interfaces.
npm install jupyter-vueVerified import paths — ran on the pinned version, not inferred.
Demonstrates creating and displaying a reactive Vue component widget using the `ipyvue` Python library, which relies on `jupyter-vue` for frontend rendering. This example includes a counter with increment/decrement buttons and a text input field, showcasing two-way data binding and method calling between Python and Vue.
Enable globally via environment variable `IPYVUE_SCOPED_CSS_SUPPORT=1` before starting Jupyter, or per widget instance using `scoped_css_support=True` in the Python `VueTemplate` class definition or constructor.
Always assign a new object to mutable traitlets to trigger synchronization: e.g., `self.my_list = self.my_list + [new_item]` or `self.my_dict = {**self.my_dict, 'key': 'value'}`.Consult `ipyvue` and `jupyterlab` documentation for recommended dependency versions. Use `jlpm` (JupyterLab's pinned `yarn` version) for frontend builds and ensure consistent dependency versions across your project and JupyterLab's installed extensions.
Review any custom event handlers that process `data` from frontend events to ensure they correctly handle the expanded set of serializable event properties now being sent.
After `pip install ipyvue` (which handles the frontend installation), run `jupyter nbextension enable --py --sys-prefix ipyvue` for Jupyter Notebook. For JupyterLab (version 3+ typically handles this automatically), if issues persist, `jupyter labextension install @jupyter-widgets/jupyterlab-manager` might be needed. Always restart your Jupyter kernel and browser page after enabling extensions.
Install the Python package using pip: `pip install ipyvue`. Ensure your Jupyter environment is using the Python kernel where `ipyvue` is installed.
Ensure the `template` string provided to `ipyvue.VueTemplate` is valid HTML with correct Vue.js syntax, including wrapping the main component content within a single `<template>` tag.
For Google Colab, enable the custom widget manager and ensure `ipyvue` is installed within the Colab environment: `from google.colab import output; output.enable_custom_widget_manager(); !pip install ipyvue`.