Skip to content
Interactive Widgets for the Jupyter Notebook
TypeScript Python CSS JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Output markdown Jan 10, 2020
.vscode Suggest vscode prettier extension Jan 14, 2020
docs Merge pull request #2678 from davidbrochart/debounce Jan 15, 2020
examples Run lint on all files: yarn run lint Jan 14, 2020
ipywidgets Merge pull request #2723 from jasongrout/memoryview Jan 17, 2020
packages Merge pull request #2532 from vidartf/labmanager-refactor Jan 17, 2020
scripts Run lint on all files: yarn run lint Jan 14, 2020
widgetsnbextension Fix missing comma Jan 17, 2020
.eslintignore exclude js files for consistency of vscode eslint extension with comm… Jan 8, 2020
.eslintrc.json disable eslint formatting rules that conflict with prettier Jan 14, 2020
.gitignore recommend vscode esling extension Jan 8, 2020
.lintstagedrc Do not run prettier in markdown files for lint-staged Jan 14, 2020
.mailmap Update mailmap. Apr 9, 2018
.npmrc prevent npm install, yarn install should be used Jan 8, 2020
.prettierrc Update tslint config and add prettier. Jan 3, 2020
.yarnrc Configure yarn to point to the npmjs repo Nov 17, 2017
CONTRIBUTING.md Tweak wording Nov 20, 2017
LICENSE Clarify license files. Jul 16, 2018
MANIFEST.in Clarify license files. Jul 16, 2018
README.md Make docs point to stable Jan 9, 2020
dev-install.sh Install test extras_require in dev_install Jan 10, 2020
lerna.json update lerna Sep 4, 2018
package.json Prettier quotes for windows Jan 15, 2020
readthedocs.yml Use pip instead of conda to install dependencies Jan 9, 2020
setup.cfg Include LICENSE file in wheels Jun 10, 2018
setup.py require at least ipython 6.1 so we can use _repr_mimebundle Dec 31, 2019
tsconfigbase.json Merge pull request #2707 from vidartf/fix-types Jan 11, 2020
yarn.lock Update yarn.lock Jan 17, 2020

README.md

ipywidgets: Interactive HTML Widgets

Version Build Status Documentation Status Join the chat at https://gitter.im/ipython/ipywidgets Binder

ipywidgets 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.

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 custom widget libraries.

A template project is available in the form of a cookie cutter here.

This project is meant to help custom widget authors get started with the packaging and the distribution of Jupyter interactive widgets.

It 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.

Popular widget libraries such as bqplot, pythreejs and ipyleaflet

follow exactly the same template and directory structure. They can serve as more advanced examples of usage of the Jupyter widget infrastructure.

For detailed information, please refer to the ipywidgets documentation.

More advanced 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.
  • ipyleaflet a leaflet widget for Jupyter.

Install

Install the current version of ipywidgets using pip or conda.

  • With pip:
pip install ipywidgets
jupyter nbextension enable --py --sys-prefix widgetsnbextension  # can be skipped for notebook version 5.3 and above
  • With conda:
conda install -c conda-forge ipywidgets

See the Installation section of the documentation for additional details.

Installing from git

If you want to install ipywidgets from git, you will need the yarn package manager version 1.2.1 or later. Installing from git is more complicated and requires a developer install, see the developer install instructions.

To install the latest master version from the root directory of the source code, run dev-install.sh. To only build the Python package enter pip install -e ..

Compatibility

ipywidgets version Required notebook version
master 4.4
5.x 4.2
4.1.x 4.1
4.0.x 4.0

Change log

Usage

See the examples section of the documentation. The widgets are being used in a variety of ways; some uses can be seen in these notebooks:

Contributing to ipywidgets

License

We use a shared copyright model that enables all contributors to maintain the copyright on their contributions.

See the LICENSE file in this repository for details.

Project Jupyter resources

You can’t perform that action at this time.