You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,41 @@ Limits of automatic cleanup:
105
105
- It will not automatically remove all event listeners or timers.
106
106
- It cannot safely revert all stateful third-party module internals.
107
107
108
+
## Jupyter Widgets
109
+
110
+
The kernel provides built-in support for [Jupyter Widgets](https://ipywidgets.readthedocs.io/) (`ipywidgets`-compatible). Widget classes are available as globals in the kernel runtime — just instantiate and call `.display()`:
111
+
112
+
```javascript
113
+
constslider=newIntSlider({
114
+
value:50,
115
+
min:0,
116
+
max:100,
117
+
description:'My Slider'
118
+
});
119
+
display(slider);
120
+
121
+
slider.on('change:value', (newVal) => {
122
+
console.log('Slider value:', newVal);
123
+
});
124
+
```
125
+
126
+
Widgets auto-display when they are the last expression in a cell. Use the global `display()` function to display a widget explicitly, for example when assigning to a variable.
0 commit comments