Release of ipywidgets 6.0

We are pleased to announce the release of ipywidgets 6.0, the Jupyter interactive widget library. Jupyter interactive widgets enable building simple GUIs in the Jupyter notebook.

ipywidgets 6.0 is a major release of the project. In this release, we closed 197 issues and 309 pull requests with 732 commits.

Installation

Using conda:

conda install ipywidgets -c conda-forge  

Using pip:

pip install ipywidgets  
jupyter nbextension enable --py --sys-prefix widgetsnbextension  

What's new in ipywidgets 6.0?

Custom widget styling

In addition to the existing Widget.layout attribute, which enables the specification of layout-related css properties for the top-most DOM element of a widget, we added a new Widget.style attribute. This attribute enables custom styling of various widget types (such as Button.style.button_color).

The top-level styling properties that were deprecated in ipywidgets 5.0 have been removed.

Using widgets outside of the notebook

Another change in 6.0 is the ability to render Jupyter interactive widgets outside of the notebook:

  • Widgets can be rendered in Sphinx documentation, either with the jupyter-sphinx extension or the nbsphinx notebook converter.
  • Widgets now render on nbviewer.
  • Jupyter interactive widgets can be embedded into static web sites, such as http://jupyter.org/widgets.

Custom widget libraries built upon ipywidgets 6.0 can also take advantage of these features.

This feature required the formal specification of a mime type for Jupyter interactive widgets, which is now contained in the new jupyter-widgets-schema npm package.

Redesign of the core widgets

The widgets provided with the base Jupyter widget libraries have gone through a major re-design.

We also migrated from the less CSS preprocessor to the use of css variables. In addition to the main benefits of adopting web standards, we take advantage of css variables defined in JupyterLab to style the interactive widgets consistent with the environment.

Migration to Typescript

The jupyter-js-widgets JavaScript package, which is the front-end component of ipywidgets, has been completely refactored and migrated to the Typescript programming language. We also adopted the PhosphorJS JavaScript framework, which is at the foundation of the JupyterLab project, for better layout capability and integration with JupyterLab.

Credits

This release has been a team effort of a large number of contributors. We would like to thank the following 31 people who contributed, and especially the 14 people who contributed for the first time in this release.

Contributors to this release (alphabetical order):

Afshin Darian (first contribution)
Adam Chainz (first contribution)
Benjamin Ragan-Kelley
Brian Granger
Cameron Oelsen (first contribution)
Carol Willing
Dave Willmer
denfromufa
Giles Weaver (first contribution)
Gino Bustelo
Grant Nestor (first contribution)
Jason Grout
Javier Pedemonte
Jeff (first contribution)
Jeroen Demeyer
Jonathan Frederic
Justin McCandless (first contribution)
Ludwig Schmidt-Hackenberg (first contribution)
Maarten Breddels (first contribution)
Martin Renou (first contribution)
Matthew Craig
Matthias Bussonnier
Michael Pacer (first contribution)
Oliver Evans (first contribution)
Paul Ivanov
Philipp Rudiger (first contribution)
Srinivas Kumar Sunkara (first contribution)
Steven Silvester
stonebig (first contribution)
Thomas Kluyver
Sylvain Corlay
Yoshiki Vázquez Baeza