# Widgets

**URL:** https://discourse.jupyter.org/c/widgets/46.md?page=3

[Latest](https://discourse.jupyter.org/latest.md) · [Categories](https://discourse.jupyter.org/categories.md) · [Tags](https://discourse.jupyter.org/tags.md)

**Page:** 4

---

## [Widgets don't preserve user selected inputs after a kernel restart](https://discourse.jupyter.org/t/widgets-dont-preserve-user-selected-inputs-after-a-kernel-restart/17921)

<div class="topic-metadata">

**Author:** [@Jahira\_I](https://discourse.jupyter.org/u/Jahira_I)\
**Replies:** 7\
**Last updated:** [May 10, 2023, 2:21pm UTC](https://discourse.jupyter.org/t/widgets-dont-preserve-user-selected-inputs-after-a-kernel-restart/17921 "2023-05-10T14:21:14Z")

</div>

After a kernel restart widgets are not preserving the user-selected inputs. Here is the use case: I create a notebook with multiple widgets, and save the notebook. After a kernel restart, if I run the notebook again, th…

---

## [Ipyreact: Write React in the Jupyter notebook without JavaScript build tools](https://discourse.jupyter.org/t/ipyreact-write-react-in-the-jupyter-notebook-without-javascript-build-tools/19058)

<div class="topic-metadata">

**Author:** [@maartenbreddels](https://discourse.jupyter.org/u/maartenbreddels)\
**Replies:** 0\
**Last updated:** [April 21, 2023, 1:47pm UTC](https://discourse.jupyter.org/t/ipyreact-write-react-in-the-jupyter-notebook-without-javascript-build-tools/19058 "2023-04-21T13:47:45Z")

</div>

React for ipywidgets that just works. No webpack, no npm, no hassle. Just write jsx, tsx and python. Transpiling happens in the Frontend using sucrase, so you don’t need to setup nodejs or anything. I think a videos …

---

## [Partial touch on a widget view?](https://discourse.jupyter.org/t/partial-touch-on-a-widget-view/18743)

<div class="topic-metadata">

**Author:** [@marclava](https://discourse.jupyter.org/u/marclava)\
**Replies:** 3\
**Last updated:** [April 5, 2023, 12:43pm UTC](https://discourse.jupyter.org/t/partial-touch-on-a-widget-view/18743 "2023-04-05T12:43:57Z")

</div>

I’m new to ipywidgets and already started to code a custom widget with two values: a UI with one to many controls that is initialized with default values from a JSON definition (that can be quite big) and a parameter for…

---

## [Download widget?](https://discourse.jupyter.org/t/download-widget/18758)

<div class="topic-metadata">

**Author:** [@Junior19](https://discourse.jupyter.org/u/Junior19)\
**Replies:** 10\
**Last updated:** [April 4, 2023, 7:07am UTC](https://discourse.jupyter.org/t/download-widget/18758 "2023-04-04T07:07:04Z")

</div>

Hi, I’m making an app with ipywidgets, voila and binder, which basically creates a word document based on certain parameters. The only thing I need is that the user can download the word document created, but the command…

---

## [Node.js Dock Panel object is not iterable](https://discourse.jupyter.org/t/node-js-dock-panel-object-is-not-iterable/18566)

<div class="topic-metadata">

**Author:** [@Art\_Anderson](https://discourse.jupyter.org/u/Art_Anderson)\
**Replies:** 1\
**Last updated:** [March 28, 2023, 5:57pm UTC](https://discourse.jupyter.org/t/node-js-dock-panel-object-is-not-iterable/18566 "2023-03-28T17:57:34Z")

</div>

I’ve upgraded to @lumino/widgets 2.0.0 for my Node.js project and now my site breaks with this error: object is not iterable TypeError: object is not iterable at some (webpack-internal:///./node\_modules/@lumino/widg…

---

## [Can you define custom observables?](https://discourse.jupyter.org/t/can-you-define-custom-observables/18674)

<div class="topic-metadata">

**Author:** [@ramirezfranciscof](https://discourse.jupyter.org/u/ramirezfranciscof)\
**Replies:** 1\
**Last updated:** [March 28, 2023, 1:02pm UTC](https://discourse.jupyter.org/t/can-you-define-custom-observables/18674 "2023-03-28T13:02:51Z")

</div>

With default widgets, such as sliders, it is possible to observe the value or other traits so that any changes trigger a given function (see here): w\_slider = widgets.IntSlider() w\_output = widgets.Output() def on\_valu…

---

## [How do I trigger an event after a widget is displayed?](https://discourse.jupyter.org/t/how-do-i-trigger-an-event-after-a-widget-is-displayed/18506)

<div class="topic-metadata">

**Author:** [@tmtabor](https://discourse.jupyter.org/u/tmtabor)\
**Replies:** 5\
**Last updated:** [March 21, 2023, 9:14pm UTC](https://discourse.jupyter.org/t/how-do-i-trigger-an-event-after-a-widget-is-displayed/18506 "2023-03-21T21:14:49Z")

</div>

I have a custom widget that I’m updating for compatibility with ipywidgets 8. The widget has a callback that needs to be made after each time the widget is displayed. Previously I used the on\_displayed method for this, …

---

## [Interaction with animation widgets in matplotlib](https://discourse.jupyter.org/t/interaction-with-animation-widgets-in-matplotlib/18171)

<div class="topic-metadata">

**Author:** [@aplund](https://discourse.jupyter.org/u/aplund)\
**Replies:** 3\
**Last updated:** [February 27, 2023, 4:05pm UTC](https://discourse.jupyter.org/t/interaction-with-animation-widgets-in-matplotlib/18171 "2023-02-27T16:05:36Z")

</div>

Using matplotlib with the %matplotlib widget magic displays figures as widgets, but there seems to be very little interaction with the animation. It would be nice to have animation controls, but to achieve this I’ve fou…

---

## [New library for interactive charting of financial instruments](https://discourse.jupyter.org/t/new-library-for-interactive-charting-of-financial-instruments/18130)

<div class="topic-metadata">

**Author:** [@maread99](https://discourse.jupyter.org/u/maread99)\
**Replies:** 0\
**Last updated:** [February 24, 2023, 8:39am UTC](https://discourse.jupyter.org/t/new-library-for-interactive-charting-of-financial-instruments/18130 "2023-02-24T08:39:13Z")

</div>

Hi everyone. I’ve just released market-analy which offers interactive charting of financial instruments via guis comprising widgets from ipywidgets, ipyvuetify and bqplot. Example videos on the readme and demo video her…

---

## [Problem rendering a dashboard with Voilà](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579)

<div class="topic-metadata">

**Author:** [@nl.fr](https://discourse.jupyter.org/u/nl.fr)\
**Replies:** 4\
**Last updated:** [February 16, 2023, 12:32pm UTC](https://discourse.jupyter.org/t/problem-rendering-a-dashboard-with-voila/17579 "2023-02-16T12:32:33Z")

</div>

Hi all, I have a Jupyter notebook deployed as a web app using Voilà. This notebook embeds approx. 60 ipywigets and 2 bokeh plots. Everything works fine under jupyterlab but I’m facing a page rendering problem when the a…

---

## [Introducing Solara (an ipywidgets based app framework)](https://discourse.jupyter.org/t/introducing-solara-an-ipywidgets-based-app-framework/17981)

<div class="topic-metadata">

**Author:** [@maartenbreddels](https://discourse.jupyter.org/u/maartenbreddels)\
**Replies:** 0\
**Last updated:** [February 14, 2023, 6:36pm UTC](https://discourse.jupyter.org/t/introducing-solara-an-ipywidgets-based-app-framework/17981 "2023-02-14T18:36:23Z")

</div>

Hi :wave: I haven’t been very active on this forum, but I will try to be a bit more active from now on. I am a core ipywidgets developer and maintainer and (co)-created several ipywidgets libraries (ipyvolume, ipyvueti…

---

## [Widget Button to open url](https://discourse.jupyter.org/t/widget-button-to-open-url/11634)

<div class="topic-metadata">

**Author:** [@afonit](https://discourse.jupyter.org/u/afonit)\
**Replies:** 8\
**Last updated:** [February 10, 2023, 8:25am UTC](https://discourse.jupyter.org/t/widget-button-to-open-url/11634 "2023-02-10T08:25:50Z")

</div>

Background: As apart of an application I do have links being displayed that one can click on to go to external pages (to the voila page), however in an attempt to make it a bit more presentable I wanted to see if I could…

---

## [Trouble creating a widget in kernel from frontend](https://discourse.jupyter.org/t/trouble-creating-a-widget-in-kernel-from-frontend/17887)

<div class="topic-metadata">

**Author:** [@matthewturk](https://discourse.jupyter.org/u/matthewturk)\
**Replies:** 5\
**Last updated:** [February 8, 2023, 12:34pm UTC](https://discourse.jupyter.org/t/trouble-creating-a-widget-in-kernel-from-frontend/17887 "2023-02-08T12:34:47Z")

</div>

I’m attempting to send a widget created in Typescript back to Python, but I’m running into issues that I thought I had solved in the past and now seem to have un-solved. In Python, I have a class that subclasses ipywidg…

---

## [A way to access the predefined style values via python](https://discourse.jupyter.org/t/a-way-to-access-the-predefined-style-values-via-python/17435)

<div class="topic-metadata">

**Author:** [@gMatas](https://discourse.jupyter.org/u/gMatas)\
**Replies:** 4\
**Last updated:** [January 10, 2023, 10:50pm UTC](https://discourse.jupyter.org/t/a-way-to-access-the-predefined-style-values-via-python/17435 "2023-01-10T22:50:33Z")

</div>

I’m familiar with predefined styles (“info”, “success”, “danger”, etc.) supported by widgets such as Button, FloatProgress, etc. Is there a way to set similar styles to custom widgets, i.e. built on top of HTML widget? …

---

## [Ipywidgets 8.0.0 released](https://discourse.jupyter.org/t/ipywidgets-8-0-0-released/15380)

<div class="topic-metadata">

**Author:** [@jasongrout](https://discourse.jupyter.org/u/jasongrout)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 3:44pm UTC](https://discourse.jupyter.org/t/ipywidgets-8-0-0-released/15380 "2022-12-22T15:44:55Z")

</div>

ipywidgets 8.0.0 is now released on Pypi and conda-forge. This release, several years in the making, brings new widgets, many more styling options, and many other features. See the changelog at ipywidgets Changelog — Jup…

---

## [CSS for custom widget](https://discourse.jupyter.org/t/css-for-custom-widget/16865)

<div class="topic-metadata">

**Author:** [@hbredin](https://discourse.jupyter.org/u/hbredin)\
**Replies:** 7\
**Last updated:** [December 9, 2022, 4:09pm UTC](https://discourse.jupyter.org/t/css-for-custom-widget/16865 "2022-12-09T16:09:03Z")

</div>

I am in the process of building a custom widget for audio annotation. Now that I have something working, I want to make it pretty :slight\_smile: How does one package a CSS style sheet into a custom widget? Hervé. P…

---

## [allow\_none=True for typical widgets?](https://discourse.jupyter.org/t/allow-none-true-for-typical-widgets/17147)

<div class="topic-metadata">

**Author:** [@jgunstone](https://discourse.jupyter.org/u/jgunstone)\
**Replies:** 1\
**Last updated:** [December 8, 2022, 7:49am UTC](https://discourse.jupyter.org/t/allow-none-true-for-typical-widgets/17147 "2022-12-08T07:49:49Z")

</div>

widgets always coerce the value to a default. this sometimes leads to unwanted behaviour in user input forms when the user selects nothing but the widget always returns a default value. i.e. import ipywidgets as widget…

---

## [Ipywidget - page navigation](https://discourse.jupyter.org/t/ipywidget-page-navigation/17130)

<div class="topic-metadata">

**Author:** [@Kevin\_Sweeney](https://discourse.jupyter.org/u/Kevin_Sweeney)\
**Replies:** 2\
**Last updated:** [December 6, 2022, 2:33pm UTC](https://discourse.jupyter.org/t/ipywidget-page-navigation/17130 "2022-12-06T14:33:50Z")

</div>

I am looking to add something like a page navigation to my Jupyter Notebook. Basically, I have 100’s of images which I am loading into a grid of NxM InputWidget’s. I would like the user to be able to scroll through the …

---

## [Upload File from Local to S3 Storage](https://discourse.jupyter.org/t/upload-file-from-local-to-s3-storage/16869)

<div class="topic-metadata">

**Author:** [@kchou0907](https://discourse.jupyter.org/u/kchou0907)\
**Replies:** 1\
**Last updated:** [November 19, 2022, 3:19pm UTC](https://discourse.jupyter.org/t/upload-file-from-local-to-s3-storage/16869 "2022-11-19T15:19:18Z")

</div>

Hey all! Like the title says, I want to upload a file from my local system to S3 through Jupyter. I’m currently doing this via HTML injection by creating a form because this allows me to upload directly without uploadin…

---

## [Does this.model.set('value', ...) trigger 'change:value' event?](https://discourse.jupyter.org/t/does-this-model-set-value-trigger-change-value-event/16856)

<div class="topic-metadata">

**Author:** [@hbredin](https://discourse.jupyter.org/u/hbredin)\
**Replies:** 2\
**Last updated:** [November 18, 2022, 11:53am UTC](https://discourse.jupyter.org/t/does-this-model-set-value-trigger-change-value-event/16856 "2022-11-18T11:53:59Z")

</div>

I have been playing with ipywidget for only a week so please be gentle :slight\_smile: I am currently trying to build a custom widget for audio annotation. On Javascript side, I have something like render() { ... …

---

## [widgets.FileUpload \`\_counter\` trait?](https://discourse.jupyter.org/t/widgets-fileupload-counter-trait/16828)

<div class="topic-metadata">

**Author:** [@jgunstone](https://discourse.jupyter.org/u/jgunstone)\
**Replies:** 0\
**Last updated:** [November 16, 2022, 11:13am UTC](https://discourse.jupyter.org/t/widgets-fileupload-counter-trait/16828 "2022-11-16T11:13:01Z")

</div>

in ipywidgets 7 there was a \_counter trait on the FileUpload widget tracking how many files had been uploaded… the \_counter trait has been removed in ipywidgets 8 - how is this dealt with now? (I’d like to reset the \_c…

---

## [Unable to get ipywidget web3 example working](https://discourse.jupyter.org/t/unable-to-get-ipywidget-web3-example-working/16601)

<div class="topic-metadata">

**Author:** [@Andy\_Smith](https://discourse.jupyter.org/u/Andy_Smith)\
**Replies:** 0\
**Last updated:** [November 1, 2022, 9:37pm UTC](https://discourse.jupyter.org/t/unable-to-get-ipywidget-web3-example-working/16601 "2022-11-01T21:37:25Z")

</div>

Hello, I am struggling to get one of the ipywidget examples (web3) working and would be very grateful for some help. I’d like to get a minimal example running which involves displaying widgets in a webpage and communica…

---

## [Ipywidgets-sparkmagic](https://discourse.jupyter.org/t/ipywidgets-sparkmagic/16508)

<div class="topic-metadata">

**Author:** [@Armadik](https://discourse.jupyter.org/u/Armadik)\
**Replies:** 2\
**Last updated:** [October 26, 2022, 7:52am UTC](https://discourse.jupyter.org/t/ipywidgets-sparkmagic/16508 "2022-10-26T07:52:27Z")

</div>

Good day. I can’t figure out ipywidgets. It doesn’t work on pyspark cores (using sparkmagic==0.20.0). In the browser logs I see the following message: Uncaught (in promise) Language pyspark not supported yet! Wha…

---

## [How to invoke call of method of Widget(Back End) from View(Front End)](https://discourse.jupyter.org/t/how-to-invoke-call-of-method-of-widget-back-end-from-view-front-end/16376)

<div class="topic-metadata">

**Author:** [@Man\_Free](https://discourse.jupyter.org/u/Man_Free)\
**Replies:** 1\
**Last updated:** [October 17, 2022, 12:40pm UTC](https://discourse.jupyter.org/t/how-to-invoke-call-of-method-of-widget-back-end-from-view-front-end/16376 "2022-10-17T12:40:39Z")

</div>

Hello, I am trying to make a custom widget in which when I click a button widget, this will somehow (send a signal maybe?) have a function in python code of Widget get called. I get it that trailtlets let any widgets s…

---

## [Select widget: select none possible? Or distinguish user-interaction value change?](https://discourse.jupyter.org/t/select-widget-select-none-possible-or-distinguish-user-interaction-value-change/16370)

<div class="topic-metadata">

**Author:** [@Gary\_Steele](https://discourse.jupyter.org/u/Gary_Steele)\
**Replies:** 2\
**Last updated:** [October 16, 2022, 2:46pm UTC](https://discourse.jupyter.org/t/select-widget-select-none-possible-or-distinguish-user-interaction-value-change/16370 "2022-10-16T14:46:44Z")

</div>

Hi all, I am making an interface in which a Select() widget will be used to display a list of files that the user can select from a folder which are then loaded into an interactive data visualisation tool. In the UI, th…

---

## [Ipywidgets background updates when the browser window is not shown, makes the browser run out of resources](https://discourse.jupyter.org/t/ipywidgets-background-updates-when-the-browser-window-is-not-shown-makes-the-browser-run-out-of-resources/14841)

<div class="topic-metadata">

**Author:** [@IngzTech](https://discourse.jupyter.org/u/IngzTech)\
**Replies:** 0\
**Last updated:** [July 5, 2022, 8:42pm UTC](https://discourse.jupyter.org/t/ipywidgets-background-updates-when-the-browser-window-is-not-shown-makes-the-browser-run-out-of-resources/14841 "2022-07-05T20:42:38Z")

</div>

I use Jupyter to show real time sensor data via ipywigdets and BQplot from various sources. The data is updated in the background using threads - that all works fine as long as the browser window is being displayed. But …

---

## [Keep previous interact output until new output is ready to display?](https://discourse.jupyter.org/t/keep-previous-interact-output-until-new-output-is-ready-to-display/14782)

<div class="topic-metadata">

**Author:** [@KrishivVora](https://discourse.jupyter.org/u/KrishivVora)\
**Replies:** 2\
**Last updated:** [June 30, 2022, 3:04pm UTC](https://discourse.jupyter.org/t/keep-previous-interact-output-until-new-output-is-ready-to-display/14782 "2022-06-30T15:04:22Z")

</div>

I’m using interact for an interactive graph network visualization, where moving a slider recolors nodes. When I move the slider, the image disappears for a moment as the new graph is rendered and displayed, during which …

---

## [Find accepting values for attributes](https://discourse.jupyter.org/t/find-accepting-values-for-attributes/14663)

<div class="topic-metadata">

**Author:** [@benniballong](https://discourse.jupyter.org/u/benniballong)\
**Replies:** 0\
**Last updated:** [June 20, 2022, 2:28pm UTC](https://discourse.jupyter.org/t/find-accepting-values-for-attributes/14663 "2022-06-20T14:28:19Z")

</div>

I’m currently looking for different keys I can pass into “description-width” of an IntText widget. I cant find any in the documentation and I’ve scanned the repo for clues. How can I find all the possible values that I…

---

## [Best practice to load cell magic](https://discourse.jupyter.org/t/best-practice-to-load-cell-magic/14206)

<div class="topic-metadata">

**Author:** [@kolibril13](https://discourse.jupyter.org/u/kolibril13)\
**Replies:** 2\
**Last updated:** [June 13, 2022, 7:02pm UTC](https://discourse.jupyter.org/t/best-practice-to-load-cell-magic/14206 "2022-06-13T19:02:46Z")

</div>

Hi, I am currently writing Jupyter cell magic packages. And now I wonder what implementation I should use to import them into the notebook.The following example is based on the package GitHub - kolibril13/jupyter-split…

---

## [Presentation: Jupyter Widgets in Cocalc](https://discourse.jupyter.org/t/presentation-jupyter-widgets-in-cocalc/14276)

<div class="topic-metadata">

**Author:** [@jasongrout](https://discourse.jupyter.org/u/jasongrout)\
**Replies:** 0\
**Last updated:** [May 17, 2022, 7:44pm UTC](https://discourse.jupyter.org/t/presentation-jupyter-widgets-in-cocalc/14276 "2022-05-17T19:44:12Z")

</div>

William Stein presented how Jupyter Widgets are implemented in CoCalc in the Jupyter Widgets development meeting on 17 May 2022. here is the recording: Jupyter Widgets in CoCalc - YouTube Thanks again, William!

[Previous page](https://discourse.jupyter.org/c/widgets/46.md?page=2)

[Next page](https://discourse.jupyter.org/c/widgets/46.md?page=4)
