Registry / web-framework / prefab-ui

prefab-ui

JSON →
library0.19.1pypypi✓ verified 84d ago

Prefab is a generative UI framework for Python by PrefectHQ. It allows building interactive web UIs with pure Python, using reactive components. Current version: 0.19.1, requires Python >=3.10. Release cadence is active with frequent minor/patch releases.

pip install prefab-ui
INSTALL
IMPORT
SIG · PREFAB-UI
P
prefab-ui
web-frameworkpythonv0.19.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PrefabApp
✓ from prefab_ui import PrefabApp
✗ import prefab

Minimal app with a button, served locally.

import prefab from prefab import App, components app = App( components.Button(text="Hello, World!") ) if __name__ == "__main__": app.serve()
Debug
Known issues
gotchaImport as `prefab` not `prefab_ui` – the PyPI package name and import name differ.
fix
Use `import prefab` or `from prefab import ...`
affects: all
gotchaComponents must be imported from `prefab.components` submodule, not directly from `prefab`.
fix
Use `from prefab.components import Button, Form, ...`
affects: >=0.16.0
gotchaReactive state management requires understanding `prefab.state` and reactive variables; misuse can cause silent UI failures.
fix
Use `prefab.state.State` or `prefab.state.Reactive` for mutable state.
affects: all
gotchaThe `Form.from_model` runtime prefill feature was added in v0.19.1; earlier versions do not support `defaults` kwarg.
fix
Upgrade to 0.19.1+ or implement prefill manually.
affects: <0.19.1
gotchaCharts default to `show_legend=True` only from v0.17.0+; earlier versions had no legend.
fix
Upgrade to 0.17.0+ or set `show_legend=True` explicitly.
affects: <0.17.0
Upgrade
Version history
0.19.1latest on PyPI · released Apr 14, 2026
Audit
Dependencies
prefectoptionalPrefab is built by PrefectHQ and often used alongside Prefect workflows, but not required.
pydanticrequiredUsed for form models and data validation.
Agent activity
4 hits · last 30 days
node
4
Resources
prefab-ui — pip install prefab-ui · libregistry