TabPanel
Lumino tab container for composing child widgets.
Children can be passed as a list or as a keyed mapping. Mapping keys become
stable child identifiers and default tab titles. Use select_key or
selected_index to choose the active tab.
Attributes
attributeselected_index= t.Int(0).tag(sync=True)attributetab_placement= t.Enum(TAB_PLACEMENTS, default_value='top').tag(sync=True)attributetabs_movable= t.Bool(False).tag(sync=True)Functions
constructor__init__(widgets=None, *, titles=None, keys=None, selected_index=0, tab_placement='top', tabs_movable=False, width='100%', height=420, resizable=True, fit_content=False) -> NoneparamwidgetsChildInput= NoneChild anywidget-compatible widgets or owner objects exposing a
widget attribute. When a mapping is passed, its keys become stable
child keys.
paramtitlesTitleInput= NoneTab titles. A mapping is resolved by child key. When widgets is a
mapping and titles are omitted, keys are used as titles.
paramkeysIterable[str] | None= NoneStable child keys for iterable widgets. Do not pass this when
widgets is a mapping.
paramselected_indexint= 0Initially selected tab index.
paramtab_placementstr= 'top'Where Lumino should place the tab bar.
paramtabs_movablebool= FalseWhether tabs can be reordered in the frontend. A drag reorders
widgets, child_keys, and titles in Python too, so
selected_key keeps naming the visible child.
paramwidthint | float | str | None= '100%'Widget width. Numbers above 1 are pixels, numbers between 0 and 1 are percentages, and strings are passed through as CSS sizes.
paramheightint | float | str | None= 420Widget height. Numbers above 1 are pixels, numbers between 0 and 1 are percentages, and strings are passed through as CSS sizes.
paramresizablebool= TrueWhether the panel receives a notebook-friendly resize handle.
paramfit_contentbool= FalseWhether the panel height follows the tab bar and the selected tab's
content, with a 180 pixel minimum, instead of height.
Returns
Nonefuncselect(index) -> NoneparamindexintReturns
Nonefuncadd_tab(widget, title=None, *, key=None, select=False) -> Noneparamwidgetobjectparamtitlestr | None= Noneparamkeystr | None= Noneparamselectbool= FalseReturns
None