reacton
What it is and what it does
Reacton brings React's declarative component model to Python's ipywidgets ecosystem, letting you write reusable UI components that automatically manage state, event handlers, and widget lifecycle. Instead of manually attaching event handlers, tracking state changes, and updating widget properties, you describe what you want the UI to look like based on your data—Reacton handles the rest, re-rendering and diffing widgets efficiently when state changes.
The package solves the complexity of non-declarative UI code by eliminating scattered event handlers, repeated initialization logic, and manual widget lifecycle management. You define components using decorators and hooks (like `use_state`), and Reacton ensures widgets are created, updated, and destroyed correctly. It supports container widgets as context managers for cleaner syntax and works with the broader ipywidgets ecosystem.
Use it for:
- Build interactive Jupyter notebooks with stateful components like counters, forms, and multi-step wizards without manual event handler management.
- Create reusable widget libraries that encapsulate UI logic and state, making them composable across multiple notebooks or applications.
- Develop data exploration dashboards where UI updates automatically reflect state changes without duplicating initialization code in event handlers.
- Simplify complex Jupyter applications by replacing imperative widget manipulation with declarative component descriptions.
- Prototype interactive data visualizations with ipyvolume or bqplot where component state drives visualization updates.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Reacton provides a React-like component model for building ipywidgets-based user interfaces in Python, handling state management, event binding, and widget lifecycle automatically.
Yes. Reacton is actively maintained, has no security vulnerabilities, and installs with minimal friction. If you build interactive Jupyter UIs with ipywidgets and find manual event handling and state tracking error-prone, Reacton's React-like model will reduce bugs and code repetition. Start with the provided examples to evaluate whether the component paradigm fits your workflow.
Install
reacton on PyPI
pip
pip install reactonuv
uv add reactonpoetry
poetry add reactonInstalling reacton
Before you install
Low install friction with only two runtime dependencies (ipywidgets and typing-extensions). The package is actively maintained with a recent release and no known vulnerabilities, making it straightforward to add to existing Jupyter environments.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects without licensing concerns.
Quickstart
pip install reacton
import reacton
import reacton.ipywidgets as w
@reacton.component
def Counter():
count, set_count = reacton.use_state(0)
return w.Button(description=f"Count: {count}", on_click=lambda: set_count(count + 1))
Counter()
Verify before relying
- Whether the package works with all ipywidgets ecosystem libraries mentioned (ipyvolume, bqplot, threejs, leaflet, ipyvuetify) or if some require additional setup.
- Performance characteristics when managing large numbers of widgets or complex component hierarchies.
- Compatibility with JupyterLab extensions and whether context manager syntax works in all Jupyter environments.
Package facts
| License | The MIT License (MIT) Copyright (c) 2022 Maarten A. Breddels Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — ipywidgets, typing-extensions |
| Maintenance | actively maintained — 38 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 144,048/month — #11,162 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: reacton-1.10.2-py2.py3-none-any.whl
Tags
More User Interfaces packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
humanfriendlyFormats and parses numbers, file sizes,…
permissive · top 1,000 on PyPI
coloredlogsAdds colored output to Python's standard…
permissive · top 1,000 on PyPI
rich-argparseFormats argparse and optparse help output with…
permissive · top 1,000 on PyPI
progressbar2progressbar2 renders text-based progress bars…
permissive · top 5,000 on PyPI
inquirerpyInquirerPy provides interactive command-line…
permissive · top 5,000 on PyPI
solaraSolara is a React-style Python framework for…
permissive · top 15,000 on PyPI
ipywidgetsipywidgets provides interactive HTML widgets…
permissive · top 1,000 on PyPI
solara-uiSolara is a React-style Python framework for…
permissive · top 15,000 on PyPI
solara-serverSolara-server is a Python web framework that…
permissive · top 15,000 on PyPI
ipyvueProvides a Jupyter widget base for building…
permissive · top 15,000 on PyPI
ipyvuetifyProvides Jupyter notebook widgets built on…
permissive · top 15,000 on PyPI
anywidgetanywidget lets you build custom interactive…
permissive · top 5,000 on PyPI
ipyeventsipyevents provides a Jupyter widget that…
permissive · top 15,000 on PyPI
shinywidgetsEmbeds ipywidgets (Jupyter interactive widgets)…
permissive · top 15,000 on PyPI
exteragram-alibProvides reactive state management, declarative…
permissive · top 15,000 on PyPI