Registry / devops / reflex-components-radix

reflex-components-radix

JSON →
library0.9.4pypypi✓ verified 86d ago

Reflex Radix Components is the official Radix UI integration for the Reflex web framework (Python). Version 0.9.4 provides pre-built, accessible UI primitives (dialog, dropdown, tooltip, etc.) that work seamlessly with Reflex's reactive state model. It follows Radix UI's headless pattern, leaving styling to the developer via Reflex's style props or custom CSS.

pip install reflex-components-radix
INSTALL
IMPORT
SIG · REFLEX-COMPONENTS-
R
reflex-components-radix
devopspythonv0.9.4
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.

rx_radix
import reflex_components_radix as rx_radix

A minimal app showing a Radix button that increments a counter.

import reflex as rx import reflex_components_radix as rx_radix class State(rx.State): count: int = 0 def index() -> rx.Component: return rx.vstack( rx_radix.button( "Clicked {{State.count}} times", on_click=State.set_count(State.count + 1), ), padding="2em", ) app = rx.App() app.add_page(index) app.compile()
Debug
Known issues
gotchaCSS framework conflict: Radix components are headless and require explicit styling. If you use a CSS framework like Tailwind, ensure it does not override Radix's aria attributes or focus management. Common issue: missing visible styles (invisible button) – apply Reflex style props or CSS classes.
fix
Always pass style props (e.g., color_scheme='indigo') or use className for custom CSS. Alternatively, wrap in rx.box with style.
affects: all
deprecatedImport path changed: In earlier alphas (<=0.2.0), the library was imported as 'radix' from 'reflex_components'. Now the correct import is 'reflex_components_radix'. Old imports will raise ModuleNotFoundError.
fix
Use 'import reflex_components_radix as rx_radix' instead of 'from reflex_components import radix'.
affects: <=0.2.0
gotchaEvent handler binding: Radix components often require custom event handlers that must be defined in the State class. Inline event handlers (e.g., on_click=rx.console_log('click')) may not work – use State methods only.
fix
Define all handlers as methods in rx.State and use lambda or direct method references (e.g., on_click=State.my_handler).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'reflex_components_radix'
Package not installed or old import path used.
fix
Run 'pip install reflex-components-radix' and use import reflex_components_radix as rx_radix.
AttributeError: module 'reflex' has no attribute 'radix'
Trying to import radix from reflex instead of from reflex_components_radix.
fix
Use 'import reflex_components_radix as rx_radix' and then rx_radix.button(...).
ReflexRadixComponent: Invalid event handler. Handlers must be callables defined in the State.
Passing a Python expression (like print('x')) directly as an event handler.
fix
Create a method in your State class and reference it: on_click=State.my_method.
Upgrade
Version history
0.9.4latest on PyPI · released Jun 4, 2026
Audit
Dependencies
reflexrequiredRequired runtime dependency - all components depend on Reflex's core framework
Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

reflex-components-radix — pip install reflex-components-radix · libregistry