Use interactive widgets
Adding widget code to your Jupyter notebook
To add an interactive widget to your notebook, first add a code cell. Press Shift+Alt+A (Windows) or ⌥ ⇧ A (macOS) to insert a new cell above the currently selected cell, or Shift+Alt+B (Windows) or ⌥ ⇧ B (macOS) to create a new cell below the selected cell. See Edit source code in the notebook for more details.
When editing code of an interactive widget, use code completion to facilitate adding constructs and quick fixes to add missing import statements.
To preview the widgets, you need to execute the corresponding code cell. You can see the values of the widget variables inlined in the editor and listed in the Variables tab of the Jupyter tool window.
When you select a color in the color picker and then execute the second code cell, the selected color is applied to the background of the notebook preview.
Handling security requirements