JupyterLab Widgets Extension

3.0.16 · active · verified Sat Mar 28

`jupyterlab-widgets` is the JupyterLab frontend extension that provides the necessary framework for rendering interactive `ipywidgets` within JupyterLab notebooks and interfaces. It enables the rich interactive experiences defined by the core `ipywidgets` Python library. As of version 3.0.16, this extension is compatible with JupyterLab 3 and 4, and for many modern setups, it is automatically handled or included when `ipywidgets` is installed.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to create and display a simple integer slider using `ipywidgets`, which `jupyterlab-widgets` enables in JupyterLab. It also shows the `interact` function for automatically creating widgets for function arguments.

from ipywidgets import IntSlider, interact
from IPython.display import display

def f(x):
    print(x)

# Create a slider widget
slider = IntSlider(min=0, max=100, step=1, description='Value:')
display(slider)

# Or use interact for quick interactive functions
interact(f, x=10);

view raw JSON →