Form / Tabs

Use tabs within a form to navigate between two or more distinct content categories.

from h2o_wave import main, app, Q, ui
tabs = ['email', label='Mail', icon='Mail'),'events', label='Events', icon='Calendar'),'spam', label='Spam'),
async def serve(q: Q):
if['example'].items = [
ui.tabs(name='menu',, items=tabs),
else:['example'] = ui.form_card(box='1 1 4 10', items=[
ui.tabs(name='menu', value='email', items=tabs),
def get_tab_content(category: str):
# Return a checklist of dummy items.
items = [f'{category.title()} {i}' for i in range(1, 11)]
return ui.checklist(name='items', choices=[ui.choice(name=item, label=item) for item in items])

Tags: โ€‚form โ€‚navigation โ€‚tabs