Skip to content

Ipywidgets

Installing the JupyterLab Extension

jupyter labextension install @jupyter-widgets/jupyterlab-manager

Using widgets

To use the widget framework, you need to import ipywidgets.

import ipywidgets as widgets

repr

Widgets have their own display repr which allows them to be displayed using IPython’s display framework. Constructing and returning an IntSlider automatically displays the widget (as seen below). Widgets are displayed inside the output area below the code cell. Clearing cell output will also remove the widget.

widgets.IntSlider()

See also

Favorite site