You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ipywidgets, also known as jupyter-widgets or simply widgets, are
interactive HTML widgets
for Jupyter notebooks and the IPython kernel.
Notebooks come alive when interactive widgets are used. Users gain control of
their data and can visualize changes in the data.
Learning becomes an immersive, fun experience. Researchers can easily see
how changing inputs to a model impact the results. We hope you will add
ipywidgets to your notebooks, and we're here to help you get started.
The fundamental widgets provided by this library are called core interactive
widgets. A demonstration notebook
provides an overview of the core interactive widgets, including:
sliders
progress bars
text boxes
toggle buttons and checkboxes
display areas
and more
Jupyter Interactive Widgets as a Framework
Besides the widgets already provided with the library, the framework can be
extended with the development of custom widget libraries. For detailed
information, please refer to the ipywidgets documentation.
Cookiecutter template for custom widget development
A template project for building custom widgets is available as a
cookiecutter.
This cookiecutter project helps custom widget authors get started with the
packaging and the distribution of their custom Jupyter interactive widgets.
The cookiecutter produces a project for a Jupyter interactive widget library
following the current best practices for using interactive widgets. An
implementation for a placeholder "Hello World" widget is provided as an example.
Popular widget libraries such as
bqplot,
pythreejs and
ipyleaflet
follow exactly the same template and directory structure. They serve as
more advanced examples of usage of the Jupyter widget infrastructure.
Popular custom widget examples
Examples of custom widget libraries built upon ipywidgets are
bqplot a 2d data visualization library
enabling custom user interactions.
pythreejs a Jupyter - Three.js wrapper,
bringing Three.js to the notebook.
The stable version of ipywidgets can be installed with pip or conda.
With pip:
pip install ipywidgets
With conda:
conda install -c conda-forge ipywidgets
Developer install from source
Installing from source is more complicated and requires a developer install,
see the detailed developer install instructions.
If you want to install ipywidgets from source, you will need the
yarn package manager version 3 or later.
To install the latest main version from the root directory of the source
code, run dev-install.sh. To only build the Python package enter
pip install -e ..