reflex chakra
v0.6.2
將 reflex 與 chakra-ui 組件結合。
pip install reflex-chakra
import reflex as rx
import reflex_chakra as rc
def index ():
return rx . fragment (
rc . vstack (
rc . heading ( "This is a header" ),
rc . center ( "This text is centered" ),
rc . button (
"click me" ,
on_click = rx . toast ( "show toast!" ),
bg = "purple" ,
border_radius = "0.5em" ,
pl = "10px"
)
),
)
app = rx . App ()
app . add_page ( index )
請造訪文件以取得有關 chakra-ui 組件的更多資訊。