New features and enhancements
- Add lazy imports for the
uimodule to speed up startup by deferring heavy element imports until first access (#5303 by @evnchn, @falkoschindler) - Make
ValueElementandValueChangeEventArgumentsgeneric for proper type inference of.valueand event arguments (#2677, #5785 by @petergaultney, @evnchn, @falkoschindler) - Add favicon support in native mode on Windows (#1745, #5841 by @falkoschindler, @FabianGoessling, @rodja, @DearRude, @evnchn)
- Add
make_sortable()to enable drag-and-drop sorting on container elements likeui.column,ui.row,ui.card, and many more (#932, #4656, #5464, #5855 by @falkoschindler, @evnchn, @EmberLightVFX, @phifuh, @marcrichard22, @nomadfox6, @HansBambel, @sergeyyurkov1, @sukhstanford, @stepheweffie, @TM0088, @weihuan) - Serve a Markdown representation of any NiceGUI page via
Accept: text/markdowncontent negotiation for AI agents and CLI tools (opt-in viaui.run(markdown=True)or@ui.page(markdown=True)) (#5889 by @evnchn, @falkoschindler, @rodja) - Raise an error when
ui.run_with()is called withnicegui.appitself, preventing a self-mount loop that exhausted CPU and RAM (#5954 by @falkoschindler, @evnchn) - Add
ui.keep_aliveto mount children eagerly regardless of visibility, fixing data loss in unmountedui.xtermand unresponsiveui.aggridinside hidden tabs or dialogs (#3033, #5839, #5951 by @falkoschindler, @natankeddem, @kyloe, @amks1, @Ha44a, @evnchn)
Bugfixes
- Fix in-page drag-and-drop in native mode being blocked by the document-level
dragoverhandler (#5943, #5962 by @phifuh, @falkoschindler, @evnchn) - Fix
app.on_exceptionnot catching exceptions from async event handlers (#5945, #5946 by @Rollmops, @falkoschindler, @evnchn) - Fix
PermissionErroron Windows when clearing file-backed storage during shutdown (#5949, #5973 by @atollk, @rodja, @falkoschindler, @evnchn) - Clear streaming client cookie jar between On Air range-requests to prevent unbounded memory growth (#5968 by @AAtomical, @falkoschindler, @evnchn, @stephanpalmer)
- Fix scoped CSS parsing for
@keyframesand similar nested at-rules, and apply scoped selectors to the component root element via tinycss2 (#5969, #5972, #5976 by @jhjcpishva, @falkoschindler, @evnchn) - Return JSON from the 404 handler for non-page endpoints so FastAPI routes keep their default error format (#5974 by @falkoschindler, @evnchn, @jsb-zz, @codingpaula)
- Preserve aspect ratio in
ui.interactive_imagewhensizeis not set, fixing stretched sponsor logos on the website (#5978, #5980 by @lawrenceakka, @falkoschindler, @evnchn) - Fix
ReferenceErrorfrom dangling weakref proxies inui.run_with()(#5979, #5981 by @giunio-prc, @falkoschindler, @evnchn)
Documentation
- Update Trello Cards example with drag-and-drop reordering within a column (#5934 by @entorb, @evnchn, @falkoschindler)
- Improve the xterm example with a configurable command, PTY resize, viewport sizing, and lifecycle hardening (#5959 by @evnchn, @falkoschindler)
- Add
ui.aggriddemo for adding rows without losing client-side edits (#5952, #5967 by @peyman-vasegh, @falkoschindler, @evnchn)
Testing
- Fix
RuntimeErrorwhen a click handler deletes the clicked element during testing (#5935, #5937, #5938 by @samuller, @falkoschindler, @evnchn)
Dependencies
- Bump pytest to v9 to address Dependabot alert 244 (#5953 by @falkoschindler, @evnchn)
- Bump softprops/action-gh-release from 2 to 3 (#5955 by @dependabot, @falkoschindler)
Special thanks to our top sponsors TestMu AI and Lechler GmbH ✨
and all our other sponsors and contributors for supporting this project!
🙏 Want to support this project? Check out our GitHub Sponsors page to help us keep building amazing features!