dash_mp_components.Tabs¶
- class dash_mp_components.Tabs(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, id: str | dict | None = None, className: str | None = None, labels: Sequence[str] | None = None, tabIndex: Annotated[SupportsFloat | SupportsInt | SupportsComplex, _NumberSchema] | None = None, arbitraryProps: dict | None = None, **kwargs)[source]¶
Bases:
ComponentA Tabs component. Custom wrapper for the react-tabs component. See https://github.com/reactjs/react-tabs
Keyword arguments:
- children (a list of or a singular dash component, string or number; optional):
Use the children prop to set the separate tab contents. Children must be a list of elements that is the same length as the list of labels in the labels prop. The element’s order in the children array determines which label it is associated with.
- id (string; optional):
The ID used to identify this component in Dash callbacks.
- arbitraryProps (dict; optional):
Object for placing all other props that are supported by react-select but are not explicitly defined here. See https://github.com/reactjs/react-tabs This is a workaround because Dash components cannot accept props that aren’t explicitly defined. e.g. { ‘defaultFocus’: True, ‘selectedTabClassName’: ‘active-tab’ }.
- className (string; optional):
Class name applied to top level wrapper for tabs and tab content. The “mpc-tabs” class is added automatically.
- labels (list of strings; optional):
List of strings to use as labels for the tabs. The number of labels must equal the number of children (i.e. tab content items).
- tabIndex (number; optional):
The current or default tabIndex to be active. This value can be watched and changed from outside the component (e.g. via dash callback).
- __init__(children: str | int | float | Component | None | Sequence[str | int | float | Component | None] = None, id: str | dict | None = None, className: str | None = None, labels: Sequence[str] | None = None, tabIndex: Annotated[SupportsFloat | SupportsInt | SupportsComplex, _NumberSchema] | None = None, arbitraryProps: dict | None = None, **kwargs)¶
Methods
__init__([children, id, className, labels, ...])to_plotly_json()Attributes
REQUIREDUNDEFINEDavailable_wildcard_properties