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
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,75 @@ 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 and helpers are available under `Jupyter.widgets`; destructure the ones you need before using them:
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.
|`packages/controls/src/widget_bool.ts`|`packages/javascript-kernel/src/widgets/widget_bool.ts`| Ported | Boolean widgets; related styles live in `widget_style.ts`|
164
+
|`packages/controls/src/widget_selection.ts`|`packages/javascript-kernel/src/widgets/widget_selection.ts`| Partial | Selection semantics still differ from `ipywidgets` in some cases |
165
+
|`packages/controls/src/widget_string.ts`|`packages/javascript-kernel/src/widgets/widget_string.ts`| Ported | String and display widgets; related styles live in `widget_style.ts`|
166
+
|`packages/output/src/output.ts`|`packages/javascript-kernel/src/widgets/widget_output.ts`| Partial | Output capture is supported but not feature-complete |
167
+
|`packages/controls/src/widget_button.ts`|`packages/javascript-kernel/src/widgets/widget_button.ts`| Partial | Button widget is present, but callback behavior differs slightly |
168
+
|`packages/controls/src/widget_color.ts`|`packages/javascript-kernel/src/widgets/widget_color.ts`| Ported | Color picker |
|`packages/controls/src/widget_link.ts`|`packages/javascript-kernel/src/widgets/widget_link.ts`| Ported |`jslink`, `jsdlink`, `Link`, and `DirectionalLink`|
172
+
173
+
> **Note:**`jupyterlab-widgets`, `@jupyter-widgets/controls`, and `@jupyter-widgets/output` must be available in the JupyterLite deployment for the full widget set to render.
174
+
175
+
See the [example notebook](examples/widgets.ipynb) for more usage examples.
176
+
108
177
### Enable or disable specific modes
109
178
110
179
The two runtime modes are registered by separate plugins:
0 commit comments