Ipyvuetify
Using ipyvuetify widgets with Solara
ipyvuetify
ipyvuetify is an ipywidget based library, that wraps the Vuetify component library to give beautiful material design based widgets.
Reacton and ipyvuetify
We consider ipyvuetify one of the most essential ipywidget libraries, and that is the reason why Reacton ships with generated ipyvuetify components to make your app type safe.
import solara
# rv is the reacton-ipyvuetify wrapper for Reacton/Solara
import reacton.ipyvuetify as rv
@solara.component
def Page():
clicks, set_clicks = solara.use_state(0)
def my_click_handler(*ignore_args):
# trigger a new render with a new value for clicks
set_clicks(clicks+1)
button = rv.Btn(children=[f"Clicked {clicks} times"])
rv.use_event(button, 'click', my_click_handler)
return button
Live output
Solara and ipyvuetify
Many of the Solara components are based on ipyvuetify. Do not hesitate the look at the source code of the Solara components to learn how to create your own components.