Genie Discord forum
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
I'm trying to use the drawer component through the parse_vue_html method, but I'm having some errors. Can someone show me an example of this component, I haven't seen documentation for it.
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
Please provide some code and the error you're getting. Otherwise it's hard to help.
Here's an example. You need to define the drawer sections as a list, and then in the main page set a conditional rendering with @iif so that the section is only shown when the corresponding menu button is selected
drawer(bordered = "", fieldname = "left_drawer_open", side = "left",
list(bordered = "", [
item(clickable = "", vripple = "", @click("selected_component = 'form'"),
itemsection(
"Form components"
)
),
item(clickable = "", vripple = "", @click( "selected_component = 'badge'"),
itemsection(
"Badge"
)
),
])
),
page_container(
[
Html.div(@iif("selected_component == 'form'"), [ui(Slider), ui(FilePicker), ui(TextInput)]) ]
),
![Author Avatar](https://cdn.discordapp.com/avatars/743412727464067154/bc30abeb49653e9978c0f7c90f4486a8.png?size=512)
and define these variables in @app
@in left_drawer_open = false
@in selected_component = ""
![Author Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Thanks, you're right. I thought I put the error