Skip to main content
mo.tabs is deprecated. Use mo.ui.tabs instead.
Tabs of UI elements.

Usage

tab1 = mo.vstack([mo.ui.slider(1, 10), mo.ui.text(), mo.ui.date()])
tab2 = mo.vstack(
    [
        {
            "slider": mo.ui.slider(1, 10),
            "text": mo.ui.text(),
            "date": mo.ui.date(),
        }
    ]
)
tabs = mo.tabs({"Tab 1": tab1, "Tab 2": tab2})

Signature

mo.tabs(
    tabs: dict[str, object]
) -> Html

Parameters

tabs
dict[str, object]
required
A dictionary of tab names to tab content; strings are interpreted as markdown.

Returns

Html
An Html object.

Migration

To migrate to mo.ui.tabs, use the following pattern:
# Old (deprecated)
mo.tabs({"Tab 1": content1, "Tab 2": content2})

# New
mo.ui.tabs({"Tab 1": content1, "Tab 2": content2})

Build docs developers (and LLMs) love