I would like to find out the way to add items to a toolbar menu created with ipyvuetify
# stack overflow
toolbar = vue.Toolbar(rounded=True,
color='#6BB6BC',
app=True,
children=[vue.AppBarNavIcon(children=[]),
vue.ToolbarTitle(children=['ipyvuetify toolbar']),
vue.Spacer(),
vue.Btn(class_='mx-1', children=[vue.Icon(children=['mdi-email'])])
]
)
display(toolbar)
items = [vue.ListItem(children=[
vue.ListItemTitle(children=[
f'Item {i}'])])
for i in range(1, 5)]
menu = vue.Menu(offset_y=True,
children=[vue.Btn(children=['MENU']),
vue.List(children=items)
]
)
display(menu)
The code above displays the tool bar as follows:
But I dont know how to add content to the menu, like buttons and/or input fields.
Does someone know how to code the menu and add it to the lateral toolbar menu symbol?
thanks
You can assign an 'on_event' action to a button. Here is an example.